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"]],[["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 webpage provides documentation for the \u003ccode\u003eTextSegment\u003c/code\u003e class within the Google Cloud Document AI v1 API, specifically for the .NET environment, detailing its structure, properties, and usage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextSegment\u003c/code\u003e class represents a segment of text within a document, utilizing start and end UTF-8 character indices to define its location within the \u003ccode\u003eDocument.text\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest available version of the API covered in the documentation is 3.19.0, with links provided for various previous versions, all the way down to version 1.0.0, along with the current version's documentation at version 3.4.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTextSegment\u003c/code\u003e implements multiple interfaces like IMessage, IEquatable, IDeepCloneable, and IBufferMessage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextSegment\u003c/code\u003e class has two constructors, one being an empty constructor, and another that takes a \u003ccode\u003eTextSegment\u003c/code\u003e as an argument, along with two properties, \u003ccode\u003eStartIndex\u003c/code\u003e and \u003ccode\u003eEndIndex\u003c/code\u003e, which are both of type \u003ccode\u003eInt64\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]