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
|
| 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
|
static void |
main(String[] args)
HunspellStemmer entry point.
|
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)
dictionary - HunspellDictionary that will be used to create the stemspublic 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 atpublic static void main(String[] args) throws IOException, ParseException
args - Program arguments. Should contain location of affix file and location of dic fileIOException - Can be thrown while reading from the filesParseException - Can be thrown while parsing the files