Class HunspellStemmer.Stem
java.lang.Object
org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
- Enclosing class:
HunspellStemmer
Stem represents all information known about a stem of a word. This includes the stem, and the prefixes and suffixes
that were used to change the word into the stem.
-
Constructor Summary
ConstructorsConstructorDescriptionStem(char[] stem, int stemLength) Creates a new Stem wrapping the given word stem -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPrefix(HunspellAffix prefix) Adds a prefix to the list of prefixes used to generate this stem.voidaddSuffix(HunspellAffix suffix) Adds a suffix to the list of suffixes used to generate this stem.Returns the list of prefixes used to generate the stemchar[]getStem()Returns the actual word stem itselfintReturns the list of suffixes used to generate the stem
-
Constructor Details
-
Stem
public Stem(char[] stem, int stemLength) Creates a new Stem wrapping the given word stem- Parameters:
stem- Stem of a word
-
-
Method Details
-
addPrefix
Adds a prefix to the list of prefixes used to generate this stem. Because it is assumed that prefixes are added depth first, the prefix is added to the front of the list- Parameters:
prefix- Prefix to add to the list of prefixes for this stem
-
addSuffix
Adds a suffix to the list of suffixes used to generate this stem. Because it is assumed that suffixes are added depth first, the suffix is added to the end of the list- Parameters:
suffix- Suffix to add to the list of suffixes for this stem
-
getPrefixes
Returns the list of prefixes used to generate the stem- Returns:
- List of prefixes used to generate the stem or an empty list if no prefixes were required
-
getSuffixes
Returns the list of suffixes used to generate the stem- Returns:
- List of suffixes used to generate the stem or an empty list if no suffixes were required
-
getStem
public char[] getStem()Returns the actual word stem itself- Returns:
- Word stem itself
-
getStemLength
public int getStemLength()- Returns:
- the stemLength
-
getStemString
-