Enum EncodingType (2.56.0)

public enum EncodingType extends Enum<EncodingType> implements ProtocolMessageEnum

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.

Protobuf enum google.cloud.language.v1.EncodingType

Implements

ProtocolMessageEnum

Static Fields

Name Description
NONE

If EncodingType is not specified, encoding-dependent information (such as begin_offset) will be set at -1.

NONE = 0;

NONE_VALUE

If EncodingType is not specified, encoding-dependent information (such as begin_offset) will be set at -1.

NONE = 0;

UNRECOGNIZED
UTF16

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.

UTF16 = 2;

UTF16_VALUE

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.

UTF16 = 2;

UTF32

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.

UTF32 = 3;

UTF32_VALUE

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.

UTF32 = 3;

UTF8

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.

UTF8 = 1;

UTF8_VALUE

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.

UTF8 = 1;

Static Methods

Name Description
forNumber(int value)
getDescriptor()
internalGetValueMap()
valueOf(Descriptors.EnumValueDescriptor desc)
valueOf(int value)

Deprecated. Use #forNumber(int) instead.

valueOf(String name)
values()

Methods

Name Description
getDescriptorForType()
getNumber()
getValueDescriptor()