TextAndTokens class

A class that represents a text and its corresponding tokens.

Note that equality is only based on the text, not the tokens. Two TextAndTokens objects could compare as equal even if the tokens are from different tokenizers.

This is chosen to avoid expensive deep equals checks.

Constructors

TextAndTokens({required String text, required List<int> tokens})

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
final
tokens → List<int>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override