Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextChange

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1beta2/classes.rb,
lib/google/apis/documentai_v1beta2/representations.rb,
lib/google/apis/documentai_v1beta2/representations.rb

Overview

This message is used for text changes aka. OCR corrections.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta1DocumentTextChange

Returns a new instance of GoogleCloudDocumentaiV1beta1DocumentTextChange.



2138
2139
2140
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2138

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#changed_textString

The text that replaces the text identified in the text_anchor. Corresponds to the JSON property changedText

Returns:

  • (String)


2126
2127
2128
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2126

def changed_text
  @changed_text
end

#provenanceArray<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentProvenance>

The history of this annotation. Corresponds to the JSON property provenance



2131
2132
2133
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2131

def provenance
  @provenance
end

#text_anchorGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentTextAnchor

Text reference indexing into the Document.text. Corresponds to the JSON property textAnchor



2136
2137
2138
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2136

def text_anchor
  @text_anchor
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2143
2144
2145
2146
2147
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2143

def update!(**args)
  @changed_text = args[:changed_text] if args.key?(:changed_text)
  @provenance = args[:provenance] if args.key?(:provenance)
  @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
end