19 using Lucene.Net.Analysis.Tokenattributes;
20 using Token = Lucene.Net.Analysis.Token;
24 namespace Lucene.Net.Analysis.Standard
36 termAtt = AddAttribute<ITermAttribute>();
37 typeAtt = AddAttribute<ITypeAttribute>();
40 private static readonly System.String APOSTROPHE_TYPE;
41 private static readonly System.String ACRONYM_TYPE;
51 public override bool IncrementToken()
53 if (!input.IncrementToken())
59 int bufferLength = termAtt.TermLength();
60 System.String type = typeAtt.Type;
62 if ((System.Object) type == (System.Object) APOSTROPHE_TYPE && bufferLength >= 2 && buffer[bufferLength - 2] ==
'\'' && (buffer[bufferLength - 1] ==
's' || buffer[bufferLength - 1] ==
'S'))
65 termAtt.SetTermLength(bufferLength - 2);
67 else if ((System.Object) type == (System.Object) ACRONYM_TYPE)
71 for (
int i = 0; i < bufferLength; i++)
77 termAtt.SetTermLength(upto);