@Override public Analyzer createAnalyzer() { return new EnglishAnalyzer(); }
@Override public TokenStream create(TokenStream input) { return new EnglishPossessiveFilter(input); } }
private final void step2() { if (ends("y") && vowelinstem()) { b[k] = 'i'; dirty = true; } }
@Override public PorterStemFilter create(TokenStream input) { return new PorterStemFilter(input); } }
@Override public TokenFilter create(TokenStream input) { return new KStemFilter(input); } }
@Override public TokenStream create(TokenStream input) { return new EnglishMinimalStemFilter(input); } }
private boolean vowelInStem() { for (int i = 0; i < stemLength(); i++) { if (isVowel(i)) return true; } return false; }
private final boolean vowelinstem() { int i; for (i = k0; i <= j; i++) if (! cons(i)) return true; return false; }
/** Stem a word contained in a leading portion of a char[] array. * Returns true if the stemming process resulted in a word different * from the input. You can retrieve the result with * getResultLength()/getResultBuffer() or toString(). */ public boolean stem(char[] word, int wordLen) { return stem(word, 0, wordLen); }
private boolean isVowel(int index) { return !isCons(index); }
private final boolean cons(int i) { switch (b[i]) { case 'a': case 'e': case 'i': case 'o': case 'u': return false; case 'y': return (i==k0) ? true : !cons(i-1); default: return true; } }
/** Stem a word contained in a char[]. Returns true if the stemming process * resulted in a word different from the input. You can retrieve the * result with getResultLength()/getResultBuffer() or toString(). */ public boolean stem(char[] word) { return stem(word, word.length); }
private final boolean doublec(int j) { if (j < k0+1) return false; if (b[j] != b[j-1]) return false; return cons(j); }
/** Stem the word placed into the Stemmer buffer through calls to add(). * Returns true if the stemming process resulted in a word different * from the input. You can retrieve the result with * getResultLength()/getResultBuffer() or toString(). */ public boolean stem() { return stem(0); }