Package opennlp.tools.stemmer.hunspell
Class HunspellStemmer.Results
java.lang.Object
opennlp.tools.stemmer.hunspell.HunspellStemmer.Results
- Enclosing class:
HunspellStemmer
Accumulates stems or complete morphology readings for one request.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether a direct or affixed reading reached a forbidden entry, which blocks the compound and break readings of the same input.private booleanWhether compound decomposition follows the Hungarian moving rule for the part of a word before a hyphen.private final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateResults(boolean morphological) Selects the output representation. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidAdds distinct results up to the output limit.private voidCombines accepted readings before and after a word break.private voidAdds a complete compound analysis, preserving homonym alternatives.private booleanisEmpty()Returns whether a reading has not been found.
-
Field Details
-
morphological
private final boolean morphological -
values
-
forbidden
private boolean forbiddenWhether a direct or affixed reading reached a forbidden entry, which blocks the compound and break readings of the same input. -
hyphenatedFirstPart
private boolean hyphenatedFirstPartWhether compound decomposition follows the Hungarian moving rule for the part of a word before a hyphen.
-
-
Constructor Details
-
Results
private Results(boolean morphological) Selects the output representation.- Parameters:
morphological- Whether results contain fields instead of stems.
-
-
Method Details
-
isEmpty
private boolean isEmpty()Returns whether a reading has not been found.- Returns:
- whether a reading has not been found
-
addAll
Adds distinct results up to the output limit.- Parameters:
additions- The accepted results.
-
addCompound
Adds a complete compound analysis, preserving homonym alternatives.- Parameters:
parts- The selected component entries and affixes.
-
addBroken
Combines accepted readings before and after a word break.- Parameters:
leftText- The opening text.left- The opening readings.rightText- The closing text.right- The closing readings.
-