19 using Lucene.Net.Analysis.Tokenattributes;
20 using Token = Lucene.Net.Analysis.Token;
24 using SF.Snowball.Ext;
26 namespace Lucene.Net.Analysis.Snowball
38 private static readonly System.Object[] EMPTY_ARGS =
new System.Object[0];
47 this.stemmer = stemmer;
48 termAtt = AddAttribute<ITermAttribute>();
62 System.Type stemClass = System.Type.GetType(
"SF.Snowball.Ext." + name +
"Stemmer");
65 catch (System.Exception e)
67 throw new System.SystemException(e.ToString());
69 termAtt = AddAttribute<ITermAttribute>();
73 public sealed
override bool IncrementToken()
75 if (input.IncrementToken())
77 String originalTerm = termAtt.Term;
78 stemmer.SetCurrent(originalTerm);
80 String finalTerm = stemmer.GetCurrent();
82 if (!originalTerm.Equals(finalTerm))
83 termAtt.SetTermBuffer(finalTerm);