CharTokenizer class
Constructors
- CharTokenizer.fromJson(String s)
-
factory
- CharTokenizer.fromText(String text)
-
Fit a tokenizer to
text.factory -
CharTokenizer.fromVocab(List<
String> chars) -
Restore from a previously-saved char list.
charsmust contain unique entries; order defines the id mapping.factory - CharTokenizer.loadFile(String path)
-
factory
Properties
Methods
-
decode(
List< int> ids) → String - Decode a list of int ids back to a string. Out-of-range ids become the empty string.
-
encode(
String s) → List< int> - Encode a string to a list of int ids. Unknown chars → 0.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveFile(
String path) → void -
toJson(
) → String - JSON wire format:
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited