public List<CharsRef> uniqueStems(char word[], int length) {List<CharsRef> stems = stem(word, length);if (stems.size() < 2) {return stems;}CharArraySet terms = new CharArraySet(8, dictionary.ignoreCase);List<CharsRef> deduped = new ArrayList<>();for (CharsRef s : stems) {if (!terms.contains(s)) {deduped.add(s);terms.add(s);}}return deduped;}

public List < CharsRef > uniqueStems ( char word [ ] , int length ) { List < CharsRef > stems = stem ( word , length ) ; if ( stems . size ( ) < 2 ) { return stems ; } CharArraySet terms = new CharArraySet ( 8 , dictionary . ignoreCase ) ; List < CharsRef > deduped = new ArrayList < > ( ) ; for ( CharsRef s : stems ) { if ( ! terms . contains ( s ) ) { deduped . add ( s ) ; terms . add ( s ) ; } } return deduped ; }
public IList<CharsRef> UniqueStems(char[] word, int length){IList<CharsRef> stems = Stem(word, length);if (stems.Count < 2){return stems;}CharArraySet terms = new CharArraySet(LuceneVersion.LUCENE_CURRENT, 8, dictionary.ignoreCase); IList<CharsRef> deduped = new List<CharsRef>();foreach (CharsRef s in stems){if (!terms.Contains(s)){deduped.Add(s);terms.Add(s);}}return deduped;}
