public abstract class AbstractStemmerLemmatizer extends AbstractLemmatizer implements IsCloseable, Lemmatizer
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
stemMap
Map with spellings as keys and stems as values.
|
protected Stemmer |
stemmer
The stemmer.
|
dictionary, lemmaSeparator, lemmaSeparatorString, lexicon, logger
Constructor and Description |
---|
AbstractStemmerLemmatizer() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
lemmatize(java.lang.String spelling)
Returns a lemma given a spelling.
|
java.lang.String |
lemmatize(java.lang.String spelling,
java.lang.String wordClass)
Returns a lemma given a word and a part of speech.
|
void |
setLexicon(Lexicon lexicon)
Set the lexicon containing the lemmata.
|
cantLemmatize, countLemmata, getLemmaSeparator, getLogger, isCompoundLemma, joinLemmata, joinLemmata, setDictionary, setLogger, splitLemma
close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
cantLemmatize, countLemmata, getLemmaSeparator, isCompoundLemma, joinLemmata, joinLemmata, setDictionary, splitLemma
protected Stemmer stemmer
protected java.util.Map<java.lang.String,java.lang.String> stemMap
public void setLexicon(Lexicon lexicon)
setLexicon
in interface Lemmatizer
setLexicon
in class AbstractLemmatizer
lexicon
- The lexicon. Not used here.
A no-op since the stemmer doesn't need a lexicon.
public java.lang.String lemmatize(java.lang.String spelling, java.lang.String wordClass)
lemmatize
in interface Lemmatizer
lemmatize
in class AbstractLemmatizer
spelling
- The spelling.wordClass
- The word class.This actually returns the stemmed form of the spelling, not the lemma.
public java.lang.String lemmatize(java.lang.String spelling)
lemmatize
in interface Lemmatizer
lemmatize
in class AbstractLemmatizer
spelling
- The spelling.