public sealed class 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 v1 API class Document.Types.TextAnchor.Types.TextSegment.
A text segment in the
[Document.text][google.cloud.documentai.v1.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.v1.Document.ShardInfo.text_offset]
[TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment]
half open end UTF-8 char index in the
[Document.text][google.cloud.documentai.v1.Document.text].
[TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment]
start UTF-8 char index in the
[Document.text][google.cloud.documentai.v1.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-04-17 UTC."],[[["This webpage provides documentation for the `Document.Types.TextAnchor.Types.TextSegment` class within the Google Cloud Document AI v1 API, specifically within the .NET environment."],["The `TextSegment` class represents a segment of text within a document, identified by its start and end character indices in the document's overall text."],["The page offers reference material across various versions of the API, ranging from version 1.0.0 up to the latest version, 3.19.0, allowing developers to view past iterations of the class and to view the latest documentation."],["`TextSegment` implements various interfaces, including `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`, allowing it to leverage functionalities like deep cloning and efficient buffer handling."],["The class has properties called `StartIndex` and `EndIndex`, both of which are `Int64` types, and are used to specify the position of the Text Segment within the larger Document text."]]],[]]