Package opennlp.tools.stemmer.hunspell
Record Class HunspellDictionary.Affix
java.lang.Object
java.lang.Record
opennlp.tools.stemmer.hunspell.HunspellDictionary.Affix
- Record Components:
flag- The flag naming the rule's block, which an entry carries to accept it.crossProduct- Whether the rule may combine with an affix of the opposite kind.strip- The stem material the rule replaces, restored during analysis.affix- The surface material the rule adds to the stem.condition- The condition the stem must satisfy for the rule to apply.continuation- The flags of the further affixes that may stack on this one.suffix- Whether the rule adds a suffix.morphology- The expanded morphological fields, empty when the rule declares none.flagText- The flag as written in the rule, reported as thefl:field of a rule without morphological fields.
- Enclosing class:
HunspellDictionary
static record HunspellDictionary.Affix(int flag, boolean crossProduct, String strip, String affix, AffixCondition condition, int[] continuation, boolean suffix, List<String> morphology, String flagText)
extends Record
One parsed affix rule of a
PFX or SFX block.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theaffixrecord component.private final AffixConditionThe field for theconditionrecord component.private final int[]The field for thecontinuationrecord component.private final booleanThe field for thecrossProductrecord component.private final intThe field for theflagrecord component.private final StringThe field for theflagTextrecord component.The field for themorphologyrecord component.private final StringThe field for thestriprecord component.private final booleanThe field for thesuffixrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaffix()Returns the value of theaffixrecord component.(package private) booleanallowsContinuation(int otherFlag) Checks whether a further affix may stack on this one.Returns the morphological fields, or thefl:flag field when none are declared.Returns the value of theconditionrecord component.int[]Returns the value of thecontinuationrecord component.booleanReturns the value of thecrossProductrecord component.final booleanIndicates whether some other object is "equal to" this one.intflag()Returns the value of theflagrecord component.flagText()Returns the value of theflagTextrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themorphologyrecord component.strip()Returns the value of thestriprecord component.booleansuffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
flag
private final int flagThe field for theflagrecord component. -
crossProduct
private final boolean crossProductThe field for thecrossProductrecord component. -
strip
The field for thestriprecord component. -
affix
The field for theaffixrecord component. -
condition
The field for theconditionrecord component. -
continuation
private final int[] continuationThe field for thecontinuationrecord component. -
suffix
private final boolean suffixThe field for thesuffixrecord component. -
morphology
The field for themorphologyrecord component. -
flagText
The field for theflagTextrecord component.
-
-
Constructor Details
-
Affix
Affix(int flag, boolean crossProduct, String strip, String affix, AffixCondition condition, int[] continuation, boolean suffix, List<String> morphology, String flagText) Creates an instance of aAffixrecord class.- Parameters:
flag- the value for theflagrecord componentcrossProduct- the value for thecrossProductrecord componentstrip- the value for thestriprecord componentaffix- the value for theaffixrecord componentcondition- the value for theconditionrecord componentcontinuation- the value for thecontinuationrecord componentsuffix- the value for thesuffixrecord componentmorphology- the value for themorphologyrecord componentflagText- the value for theflagTextrecord component
-
-
Method Details
-
analysisFields
Returns the morphological fields, or thefl:flag field when none are declared.- Returns:
- the morphological fields, or the
fl:flag field when none are declared
-
allowsContinuation
boolean allowsContinuation(int otherFlag) Checks whether a further affix may stack on this one.- Parameters:
otherFlag- The stacking affix's flag.- Returns:
trueif this affix's continuation classes allow it.
-
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. -
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. -
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
flag
public int flag()Returns the value of theflagrecord component.- Returns:
- the value of the
flagrecord component
-
crossProduct
public boolean crossProduct()Returns the value of thecrossProductrecord component.- Returns:
- the value of the
crossProductrecord component
-
strip
Returns the value of thestriprecord component.- Returns:
- the value of the
striprecord component
-
affix
Returns the value of theaffixrecord component.- Returns:
- the value of the
affixrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
continuation
public int[] continuation()Returns the value of thecontinuationrecord component.- Returns:
- the value of the
continuationrecord component
-
suffix
public boolean suffix()Returns the value of thesuffixrecord component.- Returns:
- the value of the
suffixrecord component
-
morphology
Returns the value of themorphologyrecord component.- Returns:
- the value of the
morphologyrecord component
-
flagText
Returns the value of theflagTextrecord component.- Returns:
- the value of the
flagTextrecord component
-