/// <summary> /// Static method for stemming with different charsets /// </summary> /// <param name="theWord"></param> /// <param name="charset"></param> /// <returns></returns> public static String Stem(String theWord, char[] charset) { RussianStemmer stemmer = new RussianStemmer(); stemmer.SetCharset(charset); return(stemmer.Stem(theWord)); }
/// <summary> /// /// </summary> /// <returns>Returns the next token in the stream, or null at EOS</returns> public override Token Next() { if ((token = input.Next()) == null) { return(null); } else { String s = stemmer.Stem(token.TermText()); if (!s.Equals(token.TermText())) { return(new Token(s, token.StartOffset(), token.EndOffset(), token.Type())); } return(token); } }
/* * Returns the next token in the stream, or null at EOS */ public sealed override bool IncrementToken() { if (input.IncrementToken()) { String term = termAtt.Term; String s = stemmer.Stem(term); if (s != null && !s.Equals(term)) { termAtt.SetTermBuffer(s); } return(true); } else { return(false); } }
/* * Static method for stemming. */ public static String StemWord(String theWord) { RussianStemmer stemmer = new RussianStemmer(); return(stemmer.Stem(theWord)); }
/* * Static method for stemming. */ public static String StemWord(String theWord) { RussianStemmer stemmer = new RussianStemmer(); return stemmer.Stem(theWord); }
/// <summary> /// Static method for stemming with different charsets /// </summary> /// <param name="theWord"></param> /// <param name="charset"></param> /// <returns></returns> public static String Stem(String theWord, char[] charset) { RussianStemmer stemmer = new RussianStemmer(); stemmer.SetCharset(charset); return stemmer.Stem(theWord); }