EncodingType class final
Represents the text encoding that the caller uses to process the output.
Providing an EncodingType is recommended because the API provides the
beginning offsets for various outputs, such as tokens and mentions, and
languages that natively use different text encodings may access offsets
differently.
- Inheritance
-
- Object
- ProtoEnum
- EncodingType
Constructors
- EncodingType(String value)
-
const
- EncodingType.fromJson(Object? json)
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNotDefault → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- $default → const EncodingType
- The default value for EncodingType.
- none → const EncodingType
-
If
EncodingTypeis not specified, encoding-dependent information (such asbegin_offset) will be set at-1. - utf8 → const EncodingType
-
Encoding-dependent information (such as
begin_offset) is calculated based on the UTF-8 encoding of the input. C++ and Go are examples of languages that use this encoding natively. - utf16 → const EncodingType
-
Encoding-dependent information (such as
begin_offset) is calculated based on the UTF-16 encoding of the input. Java and JavaScript are examples of languages that use this encoding natively. - utf32 → const EncodingType
-
Encoding-dependent information (such as
begin_offset) is calculated based on the UTF-32 encoding of the input. Python is an example of a language that uses this encoding natively.