Class: Google::Cloud::DocumentAI::V1beta3::Document::Page
- Inherits:
-
Object
- Object
- Google::Cloud::DocumentAI::V1beta3::Document::Page
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/documentai/v1beta3/document.rb
Overview
A page in a Document.
Defined Under Namespace
Classes: Block, DetectedBarcode, DetectedLanguage, Dimension, FormField, Image, ImageQualityScores, Layout, Line, Matrix, Paragraph, Symbol, Table, Token, VisualElement
Instance Attribute Summary collapse
-
#blocks ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>
A list of visually detected text blocks on the page.
-
#detected_barcodes ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>
A list of detected barcodes.
-
#detected_languages ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>
A list of detected languages together with confidence.
-
#dimension ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension
Physical dimension of the page.
-
#form_fields ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>
A list of visually detected form fields on the page.
-
#image ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image
Rendered image for this page.
-
#image_quality_scores ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores
Image quality scores.
-
#layout ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout
Layout for the page.
-
#lines ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>
A list of visually detected text lines on the page.
- #page_number ⇒ ::Integer
-
#paragraphs ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>
A list of visually detected text paragraphs on the page.
-
#provenance ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Provenance
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#symbols ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>
A list of visually detected symbols on the page.
-
#tables ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>
A list of visually detected tables on the page.
-
#tokens ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>
A list of visually detected tokens on the page.
-
#transforms ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>
Transformation matrices that were applied to the original document image to produce Page.image.
-
#visual_elements ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>
A list of detected non-text visual elements e.g.
Instance Attribute Details
#blocks ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>
Returns A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#detected_barcodes ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>
Returns A list of detected barcodes.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#detected_languages ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>
Returns A list of detected languages together with confidence.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#dimension ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension
Returns Physical dimension of the page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#form_fields ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>
Returns A list of visually detected form fields on the page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#image ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image
Returns Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#image_quality_scores ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores
Returns Image quality scores.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#layout ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout
Returns Layout for the page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#lines ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>
Returns A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#page_number ⇒ ::Integer
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#paragraphs ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>
Returns A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#provenance ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::Provenance
This field is deprecated and may be removed in the next major version update.
Returns The history of this page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#symbols ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>
Returns A list of visually detected symbols on the page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#tables ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>
Returns A list of visually detected tables on the page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#tokens ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>
Returns A list of visually detected tokens on the page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#transforms ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>
Returns Transformation matrices that were applied to the original document image to produce Page.image.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#visual_elements ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>
Returns A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 227 class Page include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Dimension for the page. # @!attribute [rw] width # @return [::Float] # Page width. # @!attribute [rw] height # @return [::Float] # Page height. # @!attribute [rw] unit # @return [::String] # Dimension unit. class Dimension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Rendered image contents for this page. # @!attribute [rw] content # @return [::String] # Raw byte content of the image. # @!attribute [rw] mime_type # @return [::String] # Encoding [media type (MIME # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) # for the image. # @!attribute [rw] width # @return [::Integer] # Width of the image in pixels. # @!attribute [rw] height # @return [::Integer] # Height of the image in pixels. class Image include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Representation for transformation matrix, intended to be compatible and # used with OpenCV format for image manipulation. # @!attribute [rw] rows # @return [::Integer] # Number of rows in the matrix. # @!attribute [rw] cols # @return [::Integer] # Number of columns in the matrix. # @!attribute [rw] type # @return [::Integer] # This encodes information about what data type the matrix uses. # For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list # of OpenCV primitive data types, please refer to # https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html # @!attribute [rw] data # @return [::String] # The matrix data. class Matrix include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Visual element describing a layout unit on a page. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] confidence # @return [::Float] # Confidence of the current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within # context of the object this layout is for. e.g. confidence can be for a # single token, a table, a visual element, etc. depending on context. # Range `[0, 1]`. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # The bounding polygon for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. # @!attribute [rw] orientation # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation] # Detected orientation for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}. class Layout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected human reading orientation. module Orientation # Unspecified orientation. ORIENTATION_UNSPECIFIED = 0 # Orientation is aligned with page up. PAGE_UP = 1 # Orientation is aligned with page right. # Turn the head 90 degrees clockwise from upright to read. PAGE_RIGHT = 2 # Orientation is aligned with page down. # Turn the head 180 degrees from upright to read. PAGE_DOWN = 3 # Orientation is aligned with page left. # Turn the head 90 degrees counterclockwise from upright to read. PAGE_LEFT = 4 end end # A block has a set of lines (collected into paragraphs) that have a # common line-spacing and orientation. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Paragraph include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A collection of tokens that a human would perceive as a line. # Does not cross column boundaries, can be horizontal, vertical, etc. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class Line include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected token. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_break # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak] # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. # @!attribute [rw] style_info # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo] # Text style attributes. class Token include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Detected break at the end of a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type] # Detected break type. class DetectedBreak include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enum to denote the type of break found. module Type # Unspecified break type. TYPE_UNSPECIFIED = 0 # A single whitespace. SPACE = 1 # A wider whitespace. WIDE_SPACE = 2 # A hyphen that indicates that a token has been split across lines. HYPHEN = 3 end end # Font and other text style attributes. # @!attribute [rw] font_size # @return [::Integer] # Font size in points (`1` point is `¹⁄₇₂` inches). # @!attribute [rw] pixel_font_size # @return [::Float] # Font size in pixels, equal to _unrounded # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_ # * _resolution_ ÷ `72.0`. # @!attribute [rw] letter_spacing # @return [::Float] # Letter spacing in points. # @!attribute [rw] font_type # @return [::String] # Name or style of the font. # @!attribute [rw] bold # @return [::Boolean] # Whether the text is bold (equivalent to # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight} # is at least `700`). # @!attribute [rw] italic # @return [::Boolean] # Whether the text is italic. # @!attribute [rw] underlined # @return [::Boolean] # Whether the text is underlined. # @!attribute [rw] strikeout # @return [::Boolean] # Whether the text is strikethrough. This feature is not supported yet. # @!attribute [rw] subscript # @return [::Boolean] # Whether the text is a subscript. This feature is not supported yet. # @!attribute [rw] superscript # @return [::Boolean] # Whether the text is a superscript. This feature is not supported yet. # @!attribute [rw] smallcaps # @return [::Boolean] # Whether the text is in small caps. This feature is not supported yet. # @!attribute [rw] font_weight # @return [::Integer] # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). # Normal is `400`, bold is `700`. # @!attribute [rw] handwritten # @return [::Boolean] # Whether the text is handwritten. # @!attribute [rw] text_color # @return [::Google::Type::Color] # Color of the text. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Color of the background. class StyleInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A detected symbol. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class Symbol include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected non-text visual elements e.g. checkbox, signature etc. on the # page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] type # @return [::String] # Type of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class VisualElement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A table representation similar to HTML table structure. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Header rows of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>] # Body rows of the table. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this table. class Table include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A row of table cells. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>] # Cells that make up this row. class TableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A cell representation inside the table. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. class TableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A form field detected on the page. # @!attribute [rw] field_name # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. # @!attribute [rw] field_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} # value. # @!attribute [rw] name_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for name together with confidence. # @!attribute [rw] value_detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages for value together with confidence. # @!attribute [rw] value_type # @return [::String] # If the value is non-textual, this field represents the type. Current # valid values are: # # - blank (this indicates the `field_value` is normal text) # - `unfilled_checkbox` # - `filled_checkbox` # @!attribute [rw] corrected_key_text # @return [::String] # Created for Labeling UI to export key text. # If corrections were made to the text identified by the # `field_name.text_anchor`, this field will contain the correction. # @!attribute [rw] corrected_value_text # @return [::String] # Created for Labeling UI to export value text. # If corrections were made to the text identified by the # `field_value.text_anchor`, this field will contain the correction. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # The history of this annotation. class FormField include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A detected barcode. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. # @!attribute [rw] barcode # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode] # Detailed barcode information of the # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}. class DetectedBarcode include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Detected language for a structural component. # @!attribute [rw] language_code # @return [::String] # The [BCP-47 language # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), # such as `en-US` or `sr-Latn`. # @!attribute [rw] confidence # @return [::Float] # Confidence of detected language. Range `[0, 1]`. class DetectedLanguage include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Image quality scores for the page image. # @!attribute [rw] quality_score # @return [::Float] # The overall quality score. Range `[0, 1]` where `1` is perfect quality. # @!attribute [rw] detected_defects # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>] # A list of detected defects. class ImageQualityScores include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Image Quality Defects # @!attribute [rw] type # @return [::String] # Name of the defect type. Supported values are: # # - `quality/defect_blurry` # - `quality/defect_noisy` # - `quality/defect_dark` # - `quality/defect_faint` # - `quality/defect_text_too_small` # - `quality/defect_document_cutoff` # - `quality/defect_text_cutoff` # - `quality/defect_glare` # @!attribute [rw] confidence # @return [::Float] # Confidence of detected defect. Range `[0, 1]` where `1` indicates # strong confidence that the defect exists. class DetectedDefect include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |