Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment
- Inherits:
-
Object
- Object
- Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/documentai_v1beta2/classes.rb,
generated/google/apis/documentai_v1beta2/representations.rb,
generated/google/apis/documentai_v1beta2/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
-
#end_index ⇒ Fixnum
TextSegment half open end UTF-8 char index in the Document.text.
-
#start_index ⇒ Fixnum
TextSegment start UTF-8 char index in the Document.text.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment
constructor
A new instance of GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment
Returns a new instance of GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment.
3496 3497 3498 |
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3496 def initialize(**args) update!(**args) end |
Instance Attribute Details
#end_index ⇒ Fixnum
TextSegment half open end UTF-8 char index in the Document.text.
Corresponds to the JSON property endIndex
3489 3490 3491 |
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3489 def end_index @end_index end |
#start_index ⇒ Fixnum
TextSegment start UTF-8 char index in the Document.text.
Corresponds to the JSON property startIndex
3494 3495 3496 |
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3494 def start_index @start_index end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3501 3502 3503 3504 |
# File 'generated/google/apis/documentai_v1beta2/classes.rb', line 3501 def update!(**args) @end_index = args[:end_index] if args.key?(:end_index) @start_index = args[:start_index] if args.key?(:start_index) end |