Class DictionaryLemmatizer
- All Implemented Interfaces:
opennlp.tools.lemmatizer.Lemmatizer
-
Constructor Summary
ConstructorsConstructorDescriptionDictionaryLemmatizer(File dictionaryFile) Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.DictionaryLemmatizer(File dictionaryFile, Charset charset) Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.DictionaryLemmatizer(InputStream dictionaryStream) Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.DictionaryLemmatizer(InputStream dictionaryStream, Charset charset) Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.DictionaryLemmatizer(Path dictionaryPath) Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary. -
Method Summary
-
Constructor Details
-
DictionaryLemmatizer
Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.The input file should have, for each line,
word\tabpostag\tablemma. Alternatively, if multiple lemmas are possible for each word-postag pair, then the format should beword\tab\postag\tablemma01#lemma02#lemma03.- Parameters:
dictionaryStream- The dictionary referenced by an openInputStream.charset- Thecharacter encodingof the dictionary.- Throws:
IOException- Thrown if IO errors occurred while reading in fromdictionaryStream.
-
DictionaryLemmatizer
Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.The input file should have, for each line,
word\tabpostag\tablemma. Alternatively, if multiple lemmas are possible for each word-postag pair, then the format should beword\tab\postag\tablemma01#lemma02#lemma03.- Parameters:
dictionaryStream- The dictionary referenced by an openInputStream.- Throws:
IOException- Thrown if IO errors occurred while reading in fromdictionaryStream.
-
DictionaryLemmatizer
Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.The input file should have, for each line,
word\tabpostag\tablemma. Alternatively, if multiple lemmas are possible for each word-postag pair, then the format should beword\tab\postag\tablemma01#lemma02#lemma03.- Parameters:
dictionaryFile- The dictionary referenced by a valid, readableFile.- Throws:
IOException- Thrown if IO errors occurred while reading in fromdictionaryFile.
-
DictionaryLemmatizer
Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.The input file should have, for each line,
word\tabpostag\tablemma. Alternatively, if multiple lemmas are possible for each word-postag pair, then the format should beword\tab\postag\tablemma01#lemma02#lemma03.- Parameters:
dictionaryFile- The dictionary referenced by a valid, readableFile.charset- Thecharacter encodingof the dictionary.- Throws:
IOException- Thrown if IO errors occurred while reading in fromdictionaryFile.
-
DictionaryLemmatizer
Initializes aDictionaryLemmatizerand relatedHashMapfrom the input tab separated dictionary.The input file should have, for each line,
word\tabpostag\tablemma. Alternatively, if multiple lemmas are possible for each word-postag pair, then the format should beword\tab\postag\tablemma01#lemma02#lemma03.- Parameters:
dictionaryPath- The dictionary referenced via a valid, readablePath.- Throws:
IOException- Thrown if IO errors occurred while reading in fromdictionaryPath.
-
-
Method Details
-
getDictMap
-
lemmatize
-
lemmatize
-