Class: Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout
- Inherits:
-
Object
- Object
- Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/documentai/v1beta3/document.rb
Overview
Represents the parsed layout of a document as a collection of blocks that the document is divided into.
Defined Under Namespace
Classes: DocumentLayoutBlock
Instance Attribute Summary collapse
-
#blocks ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>
List of blocks in the document.
Instance Attribute Details
#blocks ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>
Returns List of blocks in the document.
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 1142 class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # # Note: The following fields are mutually exclusive: `text_block`, `table_block`, `list_block`, `image_block`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # # Note: The following fields are mutually exclusive: `table_block`, `text_block`, `list_block`, `image_block`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # # Note: The following fields are mutually exclusive: `list_block`, `text_block`, `table_block`, `image_block`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] image_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutImageBlock] # Block consisting of image content. # # Note: The following fields are mutually exclusive: `image_block`, `text_block`, `table_block`, `list_block`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. # @!attribute [rw] bounding_box # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Identifies the bounding box for the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] annotations # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Annotations] # Annotation of the text block. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. # @!attribute [rw] annotations # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Annotations] # Annotation of the table block. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an image type block. # @!attribute [rw] blob_asset_id # @return [::String] # Optional. Asset id of the inline image. If set, find the image # content in the blob_assets field. # # Note: The following fields are mutually exclusive: `blob_asset_id`, `gcs_uri`, `data_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gcs_uri # @return [::String] # Optional. Google Cloud Storage uri of the image. # # Note: The following fields are mutually exclusive: `gcs_uri`, `blob_asset_id`, `data_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] data_uri # @return [::String] # Optional. Data uri of the image. # It is composed of four parts: a prefix (data:), a MIME type # indicating the type of data, an optional base64 token if # non-textual, and the data itself: # data:[<mediatype>][;base64],<data> # # Note: The following fields are mutually exclusive: `data_uri`, `blob_asset_id`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mime_type # @return [::String] # Mime type of the image. An IANA published [media type (MIME type)] # (https://www.iana.org/assignments/media-types/media-types.xhtml). # @!attribute [rw] image_text # @return [::String] # Text extracted from the image using OCR or alt text describing the # image. # @!attribute [rw] annotations # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Annotations] # Annotation of the image block. class LayoutImageBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |