Class: Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentTextAnchorTextSegment

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

Overview

A text segment in the 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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta3DocumentTextAnchorTextSegment

Returns a new instance of GoogleCloudDocumentaiV1beta3DocumentTextAnchorTextSegment.



10420
10421
10422
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10420

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

Instance Attribute Details

#end_indexFixnum

TextSegment half open end UTF-8 char index in the Document.text. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


10413
10414
10415
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10413

def end_index
  @end_index
end

#start_indexFixnum

TextSegment start UTF-8 char index in the Document.text. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


10418
10419
10420
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10418

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10425
10426
10427
10428
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10425

def update!(**args)
  @end_index = args[:end_index] if args.key?(:end_index)
  @start_index = args[:start_index] if args.key?(:start_index)
end