Stem() public method

public Stem ( String input ) : String
input String
return String
コード例 #1
0
        /// <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));
        }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
0
 /*
  * 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);
     }
 }
コード例 #4
0
        /*
         * Static method for stemming.
         */
        public static String StemWord(String theWord)
        {
            RussianStemmer stemmer = new RussianStemmer();

            return(stemmer.Stem(theWord));
        }
コード例 #5
0
ファイル: RussianStemmer.cs プロジェクト: Cefa68000/lucenenet
 /*
  * Static method for stemming.
  */
 public static String StemWord(String theWord)
 {
     RussianStemmer stemmer = new RussianStemmer();
     return stemmer.Stem(theWord);
 }
コード例 #6
0
ファイル: RussianStemmer.cs プロジェクト: Mpdreamz/lucene.net
		/// <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);
		}