public class WordnetStemmer extends SimpleStemmer
SimpleStemmer by checking to see if possible stems are actually
contained in Wordnet. If any stems are found, only these stems are returned.
If no prospective stems are found, the word is considered unknown, and the
result returned is the same as that of the SimpleStemmer class.ENDING_ch, ENDING_e, ENDING_man, ENDING_null, ENDING_s, ENDING_sh, ENDING_x, ENDING_y, ENDING_z, ruleMap, SUFFIX_ches, SUFFIX_ed, SUFFIX_er, SUFFIX_es, SUFFIX_est, SUFFIX_ful, SUFFIX_ies, SUFFIX_ing, SUFFIX_men, SUFFIX_s, SUFFIX_ses, SUFFIX_shes, SUFFIX_ss, SUFFIX_xes, SUFFIX_zes, underscore| Constructor and Description |
|---|
WordnetStemmer(IDictionary dict)
Constructs a WordnetStemmer that, naturally, requires a Wordnet
dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
findStems(String word,
POS pos)
Takes the surface form of a word, as it appears in the text, and the
assigned Wordnet part of speech.
|
IDictionary |
getDictionary()
Returns the dictionary in use by the stemmer; will not return
null |
getNounCollocationRoots, getRuleMap, getVerbCollocationRoots, normalize, stripAdjectiveSuffix, stripNounSuffix, stripVerbSuffixpublic WordnetStemmer(IDictionary dict)
dict - the dictionary to use; may not be nullNullPointerException - if the specified dictionary is nullpublic IDictionary getDictionary()
nullpublic List<String> findStems(String word, POS pos)
IStemmernull, which means that all parts of speech should be
considered. Returns a list of stems, in preferred order. No stem should
be repeated in the list. If no stems are found, this call returns an
empty list. It will never return null.findStems in interface IStemmerfindStems in class SimpleStemmerword - the surface form of which to find the stempos - the part of speech to find stems for; if null,
find stems for all parts of speechCopyright © 2018. All rights reserved.