Record Class WordToken
java.lang.Object
java.lang.Record
opennlp.tools.tokenize.uax29.WordToken
- Record Components:
span- The character offsets of the token in the source text.type- The token category.
A word token produced by
WordTokenizer: the character Span into the source text
together with its WordType.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.opennlp.tools.util.Spanspan()Returns the value of thespanrecord component.text(CharSequence source) Returns the covered text of this token.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
WordToken
-
-
Method Details
-
text
Returns the covered text of this token.- Parameters:
source- The text this token was produced from.- Returns:
- The covered text.
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
span
-
type
-