public interface Lemmatizer
Modifier and Type | Method and Description |
---|---|
boolean |
cantLemmatize(java.lang.String spelling)
Check for words that cannot be lemmatized.
|
int |
countLemmata(java.lang.String lemma)
Get number of lemmata comprising this lemma.
|
java.lang.String |
getLemmaSeparator()
Get the lemma separator string,
|
boolean |
isCompoundLemma(java.lang.String lemma)
Check if lemma is compound lemma.
|
java.lang.String |
joinLemmata(java.lang.String[] lemmata)
Join separate lemmata into a compound lemma.
|
java.lang.String |
joinLemmata(java.lang.String[] lemmata,
java.lang.String separator)
Join separate lemmata into a compound lemma.
|
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 spelling and a part of speech.
|
void |
setDictionary(java.util.Set<java.lang.String> dictionary)
Set the dictionary for checking lemmata.
|
void |
setLexicon(Lexicon lexicon)
Set the lexicon which may provide lemmata.
|
java.lang.String[] |
splitLemma(java.lang.String lemma)
Split compound lemma into separate lemmata.
|
void setLexicon(Lexicon lexicon)
lexicon
- The lexicon.void setDictionary(java.util.Set<java.lang.String> dictionary)
dictionary
- The dictionary as a string set.
May be null.java.lang.String lemmatize(java.lang.String spelling)
spelling
- The spelling.java.lang.String lemmatize(java.lang.String spelling, java.lang.String wordClass)
spelling
- The spelling.wordClass
- The word class.
The word class should be a major word class as defined in
PartOfSpeech
.
boolean cantLemmatize(java.lang.String spelling)
spelling
- The spelling to be lemmatized.java.lang.String getLemmaSeparator()
java.lang.String joinLemmata(java.lang.String[] lemmata, java.lang.String separator)
lemmata
- String array of lemmata.separator
- String to separate lemmata.java.lang.String joinLemmata(java.lang.String[] lemmata)
lemmata
- String array of part of speech lemmas.java.lang.String[] splitLemma(java.lang.String lemma)
lemma
- The compound lemma.boolean isCompoundLemma(java.lang.String lemma)
lemma
- The lemma.int countLemmata(java.lang.String lemma)
lemma
- The lemma.