Example #1
0
		/// <summary>
		/// Set a alternative/custom RussianStemmer for this filter.
		/// </summary>
		/// <param name="stemmer"></param>
		public void SetStemmer(RussianStemmer stemmer)
		{
			if (stemmer != null)
			{
				this.stemmer = stemmer;
			}
		}
 public RussianStemFilter(TokenStream _in)
     : base(_in)
 {
     stemmer = new RussianStemmer();
     termAtt = AddAttribute<ITermAttribute>();
 }
Example #3
0
 /*
  * Static method for stemming.
  */
 public static String StemWord(String theWord)
 {
     RussianStemmer stemmer = new RussianStemmer();
     return stemmer.Stem(theWord);
 }
Example #4
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);
		}
Example #5
0
		public RussianStemFilter(TokenStream _in, char[] charset) : base(_in)
		{
			stemmer = new RussianStemmer(charset);
		}