Class: Google::Cloud::AutoML::V1beta1::Document
- Inherits:
-
Object
- Object
- Google::Cloud::AutoML::V1beta1::Document
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/automl/v1beta1/data_items.rb
Overview
A structured text document e.g. a PDF.
Defined Under Namespace
Classes: Layout
Instance Attribute Summary collapse
-
#document_dimensions ⇒ ::Google::Cloud::AutoML::V1beta1::DocumentDimensions
The dimensions of the page in the document.
-
#document_text ⇒ ::Google::Cloud::AutoML::V1beta1::TextSnippet
The plain text version of this document.
-
#input_config ⇒ ::Google::Cloud::AutoML::V1beta1::DocumentInputConfig
An input config specifying the content of the document.
-
#layout ⇒ ::Array<::Google::Cloud::AutoML::V1beta1::Document::Layout>
Describes the layout of the document.
-
#page_count ⇒ ::Integer
Number of pages in the document.
Instance Attribute Details
#document_dimensions ⇒ ::Google::Cloud::AutoML::V1beta1::DocumentDimensions
Returns The dimensions of the page in the document.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'proto_docs/google/cloud/automl/v1beta1/data_items.rb', line 107 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. # @!attribute [rw] text_segment # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] # Text Segment that represents a segment in # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. # @!attribute [rw] page_number # @return [::Integer] # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts # from 1. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. # Contains exactly 4 # # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} # and they are connected by edges in the order provided, which will # represent a rectangle parallel to the frame. The # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are # relative to the page. # Coordinates are based on top-left as point (0,0). # @!attribute [rw] text_segment_type # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of TextSegment in the context of the original document. module TextSegmentType # Should not be used. TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 # The text segment is a token. e.g. word. TOKEN = 1 # The text segment is a paragraph. PARAGRAPH = 2 # The text segment is a form field. FORM_FIELD = 3 # The text segment is the name part of a form field. It will be treated # as child of another FORM_FIELD TextSegment if its span is subspan of # another TextSegment with type FORM_FIELD. FORM_FIELD_NAME = 4 # The text segment is the text content part of a form field. It will be # treated as child of another FORM_FIELD TextSegment if its span is # subspan of another TextSegment with type FORM_FIELD. FORM_FIELD_CONTENTS = 5 # The text segment is a whole table, including headers, and all rows. TABLE = 6 # The text segment is a table's headers. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_HEADER = 7 # The text segment is a row in table. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_ROW = 8 # The text segment is a cell in table. It will be treated as child of # another TABLE_ROW TextSegment if its span is subspan of another # TextSegment with type TABLE_ROW. TABLE_CELL = 9 end end end |
#document_text ⇒ ::Google::Cloud::AutoML::V1beta1::TextSnippet
Returns The plain text version of this document.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'proto_docs/google/cloud/automl/v1beta1/data_items.rb', line 107 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. # @!attribute [rw] text_segment # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] # Text Segment that represents a segment in # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. # @!attribute [rw] page_number # @return [::Integer] # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts # from 1. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. # Contains exactly 4 # # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} # and they are connected by edges in the order provided, which will # represent a rectangle parallel to the frame. The # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are # relative to the page. # Coordinates are based on top-left as point (0,0). # @!attribute [rw] text_segment_type # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of TextSegment in the context of the original document. module TextSegmentType # Should not be used. TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 # The text segment is a token. e.g. word. TOKEN = 1 # The text segment is a paragraph. PARAGRAPH = 2 # The text segment is a form field. FORM_FIELD = 3 # The text segment is the name part of a form field. It will be treated # as child of another FORM_FIELD TextSegment if its span is subspan of # another TextSegment with type FORM_FIELD. FORM_FIELD_NAME = 4 # The text segment is the text content part of a form field. It will be # treated as child of another FORM_FIELD TextSegment if its span is # subspan of another TextSegment with type FORM_FIELD. FORM_FIELD_CONTENTS = 5 # The text segment is a whole table, including headers, and all rows. TABLE = 6 # The text segment is a table's headers. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_HEADER = 7 # The text segment is a row in table. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_ROW = 8 # The text segment is a cell in table. It will be treated as child of # another TABLE_ROW TextSegment if its span is subspan of another # TextSegment with type TABLE_ROW. TABLE_CELL = 9 end end end |
#input_config ⇒ ::Google::Cloud::AutoML::V1beta1::DocumentInputConfig
Returns An input config specifying the content of the document.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'proto_docs/google/cloud/automl/v1beta1/data_items.rb', line 107 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. # @!attribute [rw] text_segment # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] # Text Segment that represents a segment in # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. # @!attribute [rw] page_number # @return [::Integer] # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts # from 1. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. # Contains exactly 4 # # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} # and they are connected by edges in the order provided, which will # represent a rectangle parallel to the frame. The # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are # relative to the page. # Coordinates are based on top-left as point (0,0). # @!attribute [rw] text_segment_type # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of TextSegment in the context of the original document. module TextSegmentType # Should not be used. TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 # The text segment is a token. e.g. word. TOKEN = 1 # The text segment is a paragraph. PARAGRAPH = 2 # The text segment is a form field. FORM_FIELD = 3 # The text segment is the name part of a form field. It will be treated # as child of another FORM_FIELD TextSegment if its span is subspan of # another TextSegment with type FORM_FIELD. FORM_FIELD_NAME = 4 # The text segment is the text content part of a form field. It will be # treated as child of another FORM_FIELD TextSegment if its span is # subspan of another TextSegment with type FORM_FIELD. FORM_FIELD_CONTENTS = 5 # The text segment is a whole table, including headers, and all rows. TABLE = 6 # The text segment is a table's headers. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_HEADER = 7 # The text segment is a row in table. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_ROW = 8 # The text segment is a cell in table. It will be treated as child of # another TABLE_ROW TextSegment if its span is subspan of another # TextSegment with type TABLE_ROW. TABLE_CELL = 9 end end end |
#layout ⇒ ::Array<::Google::Cloud::AutoML::V1beta1::Document::Layout>
Returns Describes the layout of the document. Sorted by [page_number][].
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'proto_docs/google/cloud/automl/v1beta1/data_items.rb', line 107 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. # @!attribute [rw] text_segment # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] # Text Segment that represents a segment in # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. # @!attribute [rw] page_number # @return [::Integer] # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts # from 1. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. # Contains exactly 4 # # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} # and they are connected by edges in the order provided, which will # represent a rectangle parallel to the frame. The # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are # relative to the page. # Coordinates are based on top-left as point (0,0). # @!attribute [rw] text_segment_type # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of TextSegment in the context of the original document. module TextSegmentType # Should not be used. TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 # The text segment is a token. e.g. word. TOKEN = 1 # The text segment is a paragraph. PARAGRAPH = 2 # The text segment is a form field. FORM_FIELD = 3 # The text segment is the name part of a form field. It will be treated # as child of another FORM_FIELD TextSegment if its span is subspan of # another TextSegment with type FORM_FIELD. FORM_FIELD_NAME = 4 # The text segment is the text content part of a form field. It will be # treated as child of another FORM_FIELD TextSegment if its span is # subspan of another TextSegment with type FORM_FIELD. FORM_FIELD_CONTENTS = 5 # The text segment is a whole table, including headers, and all rows. TABLE = 6 # The text segment is a table's headers. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_HEADER = 7 # The text segment is a row in table. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_ROW = 8 # The text segment is a cell in table. It will be treated as child of # another TABLE_ROW TextSegment if its span is subspan of another # TextSegment with type TABLE_ROW. TABLE_CELL = 9 end end end |
#page_count ⇒ ::Integer
Returns Number of pages in the document.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'proto_docs/google/cloud/automl/v1beta1/data_items.rb', line 107 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. # @!attribute [rw] text_segment # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] # Text Segment that represents a segment in # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. # @!attribute [rw] page_number # @return [::Integer] # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts # from 1. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. # Contains exactly 4 # # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} # and they are connected by edges in the order provided, which will # represent a rectangle parallel to the frame. The # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are # relative to the page. # Coordinates are based on top-left as point (0,0). # @!attribute [rw] text_segment_type # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of TextSegment in the context of the original document. module TextSegmentType # Should not be used. TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 # The text segment is a token. e.g. word. TOKEN = 1 # The text segment is a paragraph. PARAGRAPH = 2 # The text segment is a form field. FORM_FIELD = 3 # The text segment is the name part of a form field. It will be treated # as child of another FORM_FIELD TextSegment if its span is subspan of # another TextSegment with type FORM_FIELD. FORM_FIELD_NAME = 4 # The text segment is the text content part of a form field. It will be # treated as child of another FORM_FIELD TextSegment if its span is # subspan of another TextSegment with type FORM_FIELD. FORM_FIELD_CONTENTS = 5 # The text segment is a whole table, including headers, and all rows. TABLE = 6 # The text segment is a table's headers. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_HEADER = 7 # The text segment is a row in table. It will be treated as child of # another TABLE TextSegment if its span is subspan of another TextSegment # with type TABLE. TABLE_ROW = 8 # The text segment is a cell in table. It will be treated as child of # another TABLE_ROW TextSegment if its span is subspan of another # TextSegment with type TABLE_ROW. TABLE_CELL = 9 end end end |