public sealed class Document.Types.TextChange : IMessage<Document.Types.TextChange>, IEquatable<Document.Types.TextChange>, IDeepCloneable<Document.Types.TextChange>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Document AI v1beta3 API class Document.Types.TextChange.
This message is used for text changes aka. OCR corrections.
public Document.Types.TextAnchor TextAnchor { get; set; }
Provenance of the correction.
Text anchor indexing into the
[Document.text][google.cloud.documentai.v1beta3.Document.text]. There
can only be a single TextAnchor.text_segments element. If the start
and end index of the text segment are the same, the text change is
inserted before that index.
[[["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-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDocument.Types.TextChange\u003c/code\u003e class, part of the Cloud Document AI v1beta3 API, is used to represent and manage text changes, such as OCR corrections, within a document.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionality for message handling, comparison, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextChange\u003c/code\u003e class offers two constructors: a default constructor and one that takes another \u003ccode\u003eTextChange\u003c/code\u003e instance as a parameter for creating a copy.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eTextChange\u003c/code\u003e class include \u003ccode\u003eChangedText\u003c/code\u003e, which stores the corrected text, and \u003ccode\u003eTextAnchor\u003c/code\u003e, which provides the location and context of the change within the original document text, along with an obsolete \u003ccode\u003eProvenance\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe current latest version for this class is \u003ccode\u003e2.0.0-beta23\u003c/code\u003e, but there are also previous versions \u003ccode\u003e2.0.0-beta22\u003c/code\u003e and \u003ccode\u003e1.0.0-beta04\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Cloud Document AI v1beta3 API - Class Document.Types.TextChange (2.0.0-beta26)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta26 (latest)](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.TextChange)\n- [2.0.0-beta25](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/2.0.0-beta25/Google.Cloud.DocumentAI.V1Beta3.Document.Types.TextChange)\n- [1.0.0-beta04](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/1.0.0-beta04/Google.Cloud.DocumentAI.V1Beta3.Document.Types.TextChange) \n\n public sealed class Document.Types.TextChange : IMessage\u003cDocument.Types.TextChange\u003e, IEquatable\u003cDocument.Types.TextChange\u003e, IDeepCloneable\u003cDocument.Types.TextChange\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Document AI v1beta3 API class Document.Types.TextChange.\n\nThis message is used for text changes aka. OCR corrections. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Document.Types.TextChange \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Document](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document)[Types](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types)[TextChange](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.TextChange), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Document](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document)[Types](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types)[TextChange](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.TextChange), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Document](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document)[Types](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types)[TextChange](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.TextChange), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DocumentAI.V1Beta3](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3)\n\nAssembly\n--------\n\nGoogle.Cloud.DocumentAI.V1Beta3.dll\n\nConstructors\n------------\n\n### TextChange()\n\n public TextChange()\n\n### TextChange(TextChange)\n\n public TextChange(Document.Types.TextChange other)\n\nProperties\n----------\n\n### ChangedText\n\n public string ChangedText { get; set; }\n\nThe text that replaces the text identified in the `text_anchor`.\n\n### Provenance\n\n [Obsolete]\n public RepeatedField\u003cDocument.Types.Provenance\u003e Provenance { get; }\n\nThe history of this annotation.\n\n### TextAnchor\n\n public Document.Types.TextAnchor TextAnchor { get; set; }\n\nProvenance of the correction.\nText anchor indexing into the\n\\[Document.text\\]\\[google.cloud.documentai.v1beta3.Document.text\\]. There\ncan only be a single `TextAnchor.text_segments` element. If the start\nand end index of the text segment are the same, the text change is\ninserted before that index."]]