Package opennlp.tools.tokenize.lattice
Record Class MecabDictionary.Category
java.lang.Object
java.lang.Record
opennlp.tools.tokenize.lattice.MecabDictionary.Category
- Record Components:
id- The dense zero-based category id.name- The category name.invoke- Whether unknown-word candidates are generated even where the lexicon matched.group- Whether a full run connected by overlapping category assignments is emitted as one candidate.length- How many leading characters of the run are offered as candidates.
- Enclosing class:
MecabDictionary
static record MecabDictionary.Category(int id, String name, boolean invoke, boolean group, int length)
extends Record
One character category's unknown-word behavior from
char.def.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thegrouprecord component.private final intThe field for theidrecord component.private final booleanThe field for theinvokerecord component.private final intThe field for thelengthrecord component.private final StringThe field for thenamerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleangroup()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.booleaninvoke()Returns the value of theinvokerecord component.intlength()Returns the value of thelengthrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
private final int idThe field for theidrecord component. -
name
The field for thenamerecord component. -
invoke
private final boolean invokeThe field for theinvokerecord component. -
group
private final boolean groupThe field for thegrouprecord component. -
length
private final int lengthThe field for thelengthrecord component.
-
-
Constructor Details
-
Category
Category(int id, String name, boolean invoke, boolean group, int length) Creates an instance of aCategoryrecord class.
-
-
Method Details
-
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 '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
invoke
public boolean invoke()Returns the value of theinvokerecord component.- Returns:
- the value of the
invokerecord component
-
group
public boolean group()Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
length
public int length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-