public sealed class TextSegment : IMessage<Document.Types.TextAnchor.Types.TextSegment>, IEquatable<Document.Types.TextAnchor.Types.TextSegment>, IDeepCloneable<Document.Types.TextAnchor.Types.TextSegment>, IBufferMessage, IMessage
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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-19 UTC."],[[["\u003cp\u003eThis page provides documentation for the \u003ccode\u003eTextSegment\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.DocumentAI.V1\u003c/code\u003e namespace, specifically detailing its structure and usage across different versions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextSegment\u003c/code\u003e class, which is used to define a segment of text within a document, is a part of the \u003ccode\u003eDocument.Types.TextAnchor.Types\u003c/code\u003e nested type, and implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe page lists available versions of the \u003ccode\u003eTextSegment\u003c/code\u003e class, from version 1.0.0 up to the latest 3.19.0, with links to each version's documentation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTextSegment\u003c/code\u003e objects, which can be constructed with a default constructor or by providing another \u003ccode\u003eTextSegment\u003c/code\u003e object, have two main properties: \u003ccode\u003eStartIndex\u003c/code\u003e and \u003ccode\u003eEndIndex\u003c/code\u003e, which define the range of a text segment within a document's text using UTF-8 character indices.\u003c/p\u003e\n"],["\u003cp\u003eThe page also lists other implemented and inherited members of the \u003ccode\u003eTextSegment\u003c/code\u003e Class, and the assembly it can be found in, which is \u003ccode\u003eGoogle.Cloud.DocumentAI.V1.dll\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]