Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment
- Inherits:
-
Object
- Object
- Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/documentai_v1/classes.rb,
lib/google/apis/documentai_v1/representations.rb,
lib/google/apis/documentai_v1/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) ⇒ GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment
constructor
A new instance of GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment
Returns a new instance of GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment.
7203 7204 7205 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 7203 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
7196 7197 7198 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 7196 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
7201 7202 7203 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 7201 def start_index @start_index end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7208 7209 7210 7211 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 7208 def update!(**args) @end_index = args[:end_index] if args.key?(:end_index) @start_index = args[:start_index] if args.key?(:start_index) end |