java.lang.Object
org.apache.lucene.analysis.en.KStemmer

class KStemmer extends Object
This class implements the Kstem algorithm
  • Field Details

    • MaxWordLen

      private static final int MaxWordLen
      See Also:
    • exceptionWords

      private static final String[] exceptionWords
    • directConflations

      private static final String[][] directConflations
    • countryNationality

      private static final String[][] countryNationality
    • supplementDict

      private static final String[] supplementDict
    • properNouns

      private static final String[] properNouns
    • dict_ht

      private static final CharArrayMap<KStemmer.DictEntry> dict_ht
    • word

      private final OpenStringBuilder word
      caching off private int maxCacheSize; private CharArrayMap cache = null; private static final String SAME = "SAME"; // use if stemmed form is the same
    • j

      private int j
    • k

      private int k
    • matchedEntry

      KStemmer.DictEntry matchedEntry
    • ization

      private static char[] ization
    • ition

      private static char[] ition
    • ation

      private static char[] ation
    • ication

      private static char[] ication
    • result

      String result
  • Constructor Details

    • KStemmer

      KStemmer()
  • Method Details

    • penultChar

      private char penultChar()
    • isVowel

      private boolean isVowel(int index)
    • isCons

      private boolean isCons(int index)
    • initializeDictHash

      private static CharArrayMap<KStemmer.DictEntry> initializeDictHash()
    • isAlpha

      private boolean isAlpha(char ch)
    • stemLength

      private int stemLength()
    • endsIn

      private boolean endsIn(char[] s)
    • endsIn

      private boolean endsIn(char a, char b)
    • endsIn

      private boolean endsIn(char a, char b, char c)
    • endsIn

      private boolean endsIn(char a, char b, char c, char d)
    • wordInDict

      private KStemmer.DictEntry wordInDict()
    • plural

      private void plural()
    • setSuffix

      private void setSuffix(String s)
    • setSuff

      private void setSuff(String s, int len)
    • lookup

      private boolean lookup()
    • pastTense

      private void pastTense()
    • doubleC

      private boolean doubleC(int i)
    • vowelInStem

      private boolean vowelInStem()
    • aspect

      private void aspect()
    • ityEndings

      private void ityEndings()
    • nceEndings

      private void nceEndings()
    • nessEndings

      private void nessEndings()
    • ismEndings

      private void ismEndings()
    • mentEndings

      private void mentEndings()
    • izeEndings

      private void izeEndings()
    • ncyEndings

      private void ncyEndings()
    • bleEndings

      private void bleEndings()
    • icEndings

      private void icEndings()
    • ionEndings

      private void ionEndings()
    • erAndOrEndings

      private void erAndOrEndings()
    • lyEndings

      private void lyEndings()
    • alEndings

      private void alEndings()
    • iveEndings

      private void iveEndings()
    • stem

      String stem(String term)
    • asString

      String asString()
      Returns the result of the stem (assuming the word was changed) as a String.
    • asCharSequence

      CharSequence asCharSequence()
    • getString

      String getString()
    • getChars

      char[] getChars()
    • getLength

      int getLength()
    • matched

      private boolean matched()
    • stem

      boolean stem(char[] term, int len)
      Stems the text in the token. Returns true if changed.