|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.analysis.hunspell.HunspellStemmer
public class HunspellStemmer
HunspellStemmer uses the affix rules declared in the HunspellDictionary to generate one or more stems for a word. It conforms to the algorithm in the original hunspell algorithm, including recursive suffix stripping.
| Nested Class Summary | |
|---|---|
static class |
HunspellStemmer.Stem
Stem represents all information known about a stem of a word. |
| Constructor Summary | |
|---|---|
HunspellStemmer(HunspellDictionary dictionary)
Constructs a new HunspellStemmer which will use the provided HunspellDictionary to create its stems |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HunspellStemmer(HunspellDictionary dictionary)
dictionary - HunspellDictionary that will be used to create the stems| Method Detail |
|---|
public List<HunspellStemmer.Stem> stem(String word)
word - Word to find the stems for
public List<HunspellStemmer.Stem> stem(char[] word,
int length)
word - Word to find the stems for
public List<HunspellStemmer.Stem> uniqueStems(char[] word,
int length)
word - Word to find the stems for
public 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 at
public static void main(String[] args)
throws IOException,
ParseException
args - Program arguments. Should contain location of affix file and location of dic file
IOException - Can be thrown while reading from the files
ParseException - Can be thrown while parsing the files
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||