Class MorfologikLemmatizer
java.lang.Object
opennlp.morfologik.lemmatizer.MorfologikLemmatizer
- All Implemented Interfaces:
Lemmatizer
A
Lemmatizer implementation based on Morfologik binary
dictionaries-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMorfologikLemmatizer(Path dictionaryPath) Initializes aMorfologikLemmatizerand relatedDictionaryfrom the input tab separated dictionary.MorfologikLemmatizer(morfologik.stemming.Dictionary dictionary) Initializes aMorfologikLemmatizerand relatedDictionaryfrom the input tab separated dictionary. -
Method Summary
Modifier and TypeMethodDescriptionprivate StringasString(CharSequence tag) String[]Generates lemmas for the word and postag.Generates lemma tags for the word and postag.
-
Field Details
-
dictionary
private final morfologik.stemming.Dictionary dictionary
-
-
Constructor Details
-
MorfologikLemmatizer
Initializes aMorfologikLemmatizerand relatedDictionaryfrom the input tab separated dictionary.- Parameters:
dictionaryPath- The dictionary referenced via a valid, readablePath.- Throws:
IOException- Thrown if IO errors occurred while reading in fromdictionaryPath.
-
MorfologikLemmatizer
public MorfologikLemmatizer(morfologik.stemming.Dictionary dictionary) Initializes aMorfologikLemmatizerand relatedDictionaryfrom the input tab separated dictionary.- Parameters:
dictionary- TheDictionaryto be used.
-
-
Method Details
-
lemmatize
-
asString
-
lemmatize
Description copied from interface:LemmatizerGenerates lemmas for the word and postag.- Specified by:
lemmatizein interfaceLemmatizer- Parameters:
toks- An array of the tokenstags- an array of the pos tags- Returns:
- An array of possible lemmas for each token in the
tokssequence.
-
lemmatize
Description copied from interface:LemmatizerGenerates lemma tags for the word and postag.- Specified by:
lemmatizein interfaceLemmatizer- Parameters:
toks- An array of the tokenstags- An array of the pos tags- Returns:
- A list of every possible lemma for each token in the
tokssequence.
-