Record Class HunspellStemmer.CompoundPart

java.lang.Object
java.lang.Record
opennlp.tools.stemmer.hunspell.HunspellStemmer.CompoundPart
Record Components:
surface - The part as written.
root - The entry spelling.
flags - The selected homonym's flags.
affixes - The rules in application order.
stems - The morphology-aware stems.
Enclosing class:
HunspellStemmer

private static record HunspellStemmer.CompoundPart(String surface, String root, int[] flags, List<HunspellDictionary.Affix> affixes, List<String> stems) extends Record
One selected compound-part reading.
  • Field Details

    • surface

      private final String surface
      The field for the surface record component.
    • root

      private final String root
      The field for the root record component.
    • flags

      private final int[] flags
      The field for the flags record component.
    • affixes

      private final List<HunspellDictionary.Affix> affixes
      The field for the affixes record component.
    • stems

      private final List<String> stems
      The field for the stems record component.
  • Constructor Details

    • CompoundPart

      private CompoundPart(String surface, String root, int[] flags, List<HunspellDictionary.Affix> affixes, List<String> stems)
      Creates an instance of a CompoundPart record class.
      Parameters:
      surface - the value for the surface record component
      root - the value for the root record component
      flags - the value for the flags record component
      affixes - the value for the affixes record component
      stems - the value for the stems record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • surface

      public String surface()
      Returns the value of the surface record component.
      Returns:
      the value of the surface record component
    • root

      public String root()
      Returns the value of the root record component.
      Returns:
      the value of the root record component
    • flags

      public int[] flags()
      Returns the value of the flags record component.
      Returns:
      the value of the flags record component
    • affixes

      public List<HunspellDictionary.Affix> affixes()
      Returns the value of the affixes record component.
      Returns:
      the value of the affixes record component
    • stems

      public List<String> stems()
      Returns the value of the stems record component.
      Returns:
      the value of the stems record component