Class HunspellStemmer.Results

java.lang.Object
opennlp.tools.stemmer.hunspell.HunspellStemmer.Results
Enclosing class:
HunspellStemmer

private final class HunspellStemmer.Results extends Object
Accumulates stems or complete morphology readings for one request.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
    Whether a direct or affixed reading reached a forbidden entry, which blocks the compound and break readings of the same input.
    private boolean
    Whether compound decomposition follows the Hungarian moving rule for the part of a word before a hyphen.
    private final boolean
     
    private final Set<String>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Results(boolean morphological)
    Selects the output representation.
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    addAll(List<String> additions)
    Adds distinct results up to the output limit.
    private void
    addBroken(String leftText, List<String> left, String rightText, List<String> right)
    Combines accepted readings before and after a word break.
    private void
    Adds a complete compound analysis, preserving homonym alternatives.
    private boolean
    Returns whether a reading has not been found.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • morphological

      private final boolean morphological
    • values

      private final Set<String> values
    • forbidden

      private boolean forbidden
      Whether a direct or affixed reading reached a forbidden entry, which blocks the compound and break readings of the same input.
    • hyphenatedFirstPart

      private boolean hyphenatedFirstPart
      Whether 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

      private void addAll(List<String> additions)
      Adds distinct results up to the output limit.
      Parameters:
      additions - The accepted results.
    • addCompound

      private void addCompound(List<HunspellStemmer.CompoundPart> parts)
      Adds a complete compound analysis, preserving homonym alternatives.
      Parameters:
      parts - The selected component entries and affixes.
    • addBroken

      private void addBroken(String leftText, List<String> left, String rightText, List<String> right)
      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.