Class: Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/documentai/v1beta3/document.rb

Overview

Text reference indexing into the Document.text.

Defined Under Namespace

Classes: TextSegment

Instance Attribute Summary collapse

Instance Attribute Details

#content::String

Returns Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.

Returns:

  • (::String)

    Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.



789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 789

class TextAnchor
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A text segment in the
  # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The
  # indices may be out of bounds which indicate that the text extends into
  # another document shard for large sharded documents. See
  # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset}
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
  #     start UTF-8 char index in the
  #     {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
  #     half open end UTF-8 char index in the
  #     {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
  class TextSegment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#text_segments::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>

Returns The text segments from the Document.text.



789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 789

class TextAnchor
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A text segment in the
  # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The
  # indices may be out of bounds which indicate that the text extends into
  # another document shard for large sharded documents. See
  # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset}
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
  #     start UTF-8 char index in the
  #     {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
  #     half open end UTF-8 char index in the
  #     {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
  class TextSegment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end