public sealed class Document.Types.TextAnchor.Types.TextSegment : IMessage<Document.Types.TextAnchor.Types.TextSegment>, IEquatable<Document.Types.TextAnchor.Types.TextSegment>, IDeepCloneable<Document.Types.TextAnchor.Types.TextSegment>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Document AI v1beta3 API class Document.Types.TextAnchor.Types.TextSegment.
A text segment in the
[Document.text][google.cloud.documentai.v1beta3.Document.text]. The
indices may be out of bounds which indicate that the text extends into
another document shard for large sharded documents. See
[ShardInfo.text_offset][google.cloud.documentai.v1beta3.Document.ShardInfo.text_offset]
[TextSegment][google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment]
half open end UTF-8 char index in the
[Document.text][google.cloud.documentai.v1beta3.Document.text].
[TextSegment][google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment]
start UTF-8 char index in the
[Document.text][google.cloud.documentai.v1beta3.Document.text].
[[["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-03-24 UTC."],[[["This document provides reference information for the `Document.Types.TextAnchor.Types.TextSegment` class within the Cloud Document AI v1beta3 API, detailing its role in representing text segments."],["`TextSegment` is defined as a sealed class that implements interfaces such as `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`, indicating its functionality for message handling, equality comparisons, deep cloning, and buffer operations."],["The `TextSegment` class includes properties `StartIndex` and `EndIndex`, both of type `long`, which represent the start and end UTF-8 character index within the `Document.text`, respectively."],["The class also includes the ability to make new TextSegment objects, by using the `TextSegment()` constructor or by using `TextSegment(Document.Types.TextAnchor.Types.TextSegment other)`."],["The text segments are used for documents that may be sharded, and the indexes may extend into other shards, that can be seen in `ShardInfo.text_offset`."]]],[]]