Package opennlp.dl
Record Class Tokens
java.lang.Object
java.lang.Record
opennlp.dl.Tokens
- Record Components:
tokens- The tokens themselves.ids- The token IDs as retrieved from the vocabulary.mask- The token mask. (Typically all 1.)types- The token types. (Typically all 1.)
Holds the tokens for input to an ONNX model.
-
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.long[]ids()Returns the value of theidsrecord component.long[]mask()Returns the value of themaskrecord component.String[]tokens()Returns the value of thetokensrecord component.final StringtoString()Returns a string representation of this record class.long[]types()Returns the value of thetypesrecord component.
-
Constructor Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
tokens
Returns the value of thetokensrecord component.- Returns:
- the value of the
tokensrecord component
-
ids
public long[] ids()Returns the value of theidsrecord component.- Returns:
- the value of the
idsrecord component
-
mask
public long[] mask()Returns the value of themaskrecord component.- Returns:
- the value of the
maskrecord component
-
types
public long[] types()Returns the value of thetypesrecord component.- Returns:
- the value of the
typesrecord component
-