public class HunspellStemmer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HunspellStemmer.Stem
Stem represents all information known about a stem of a word.
|
Constructor and Description |
---|
HunspellStemmer(HunspellDictionary dictionary)
Constructs a new HunspellStemmer which will use the provided HunspellDictionary to create its stems.
|
HunspellStemmer(HunspellDictionary dictionary,
int recursionCap)
Constructs a new HunspellStemmer which will use the provided HunspellDictionary to create its stems
|
Modifier and Type | Method and Description |
---|---|
List<HunspellStemmer.Stem> |
applyAffix(char[] strippedWord,
int length,
HunspellAffix affix,
int recursionDepth)
Applies the affix rule to the given word, producing a list of stems if any are found
|
List<HunspellStemmer.Stem> |
stem(char[] word,
int length)
Find the stem(s) of the provided word
|
List<HunspellStemmer.Stem> |
stem(String word)
Find the stem(s) of the provided word
|
List<HunspellStemmer.Stem> |
uniqueStems(char[] word,
int length)
Find the unique stem(s) of the provided word
|
public HunspellStemmer(HunspellDictionary dictionary)
2
(based on Hunspell documentation).dictionary
- HunspellDictionary that will be used to create the stemspublic HunspellStemmer(HunspellDictionary dictionary, int recursionCap)
dictionary
- HunspellDictionary that will be used to create the stemsrecursionCap
- maximum level of recursion stemmer can go intopublic List<HunspellStemmer.Stem> stem(String word)
word
- Word to find the stems forpublic List<HunspellStemmer.Stem> stem(char[] word, int length)
word
- Word to find the stems forpublic List<HunspellStemmer.Stem> uniqueStems(char[] word, int length)
word
- Word to find the stems forpublic List<HunspellStemmer.Stem> applyAffix(char[] strippedWord, int length, HunspellAffix affix, int recursionDepth)
strippedWord
- Word the affix has been removed and the strip addedaffix
- HunspellAffix representing the affix rule itselfrecursionDepth
- Level of recursion this stemming step is atCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.