Reference documentation and code samples for the Google Cloud Natural Language v1 API enum EncodingType.
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.
If EncodingType is not specified, encoding-dependent information (such as
begin_offset) will be set at -1.
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["This webpage provides documentation for the `EncodingType` enum within the Google Cloud Natural Language v1 API, detailing its purpose in specifying text encoding for processing output."],["The `EncodingType` enum is used because the API provides beginning offsets for outputs like tokens and mentions, which are processed differently across various text encodings."],["The documentation outlines four possible values for `EncodingType`: `None`, `Utf16`, `Utf32`, and `Utf8`, each with descriptions of how encoding-dependent information is calculated."],["The available version documentations range from version 2.2.0 to the most recent 3.7.0, where the currently highlighted version is 3.4.0."]]],[]]