Class: Google::Cloud::DocumentAI::V1beta3::Document
- Inherits:
-
Object
- Object
- Google::Cloud::DocumentAI::V1beta3::Document
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/documentai/v1beta3/document.rb
Overview
Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.
Defined Under Namespace
Classes: ChunkedDocument, DocumentLayout, Entity, EntityRelation, Page, PageAnchor, Provenance, Revision, ShardInfo, Style, TextAnchor, TextChange
Instance Attribute Summary collapse
-
#chunked_document ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument
Document chunked based on chunking config.
-
#content ⇒ ::String
Optional.
-
#document_layout ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout
Parsed layout of the document.
-
#entities ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>
A list of entities detected on Document.text.
-
#entity_relations ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>
Placeholder.
-
#error ⇒ ::Google::Rpc::Status
Any error that occurred while processing this document.
-
#mime_type ⇒ ::String
An IANA published media type (MIME type).
-
#pages ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>
Visual page layout for the Document.
-
#revisions ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>
Placeholder.
-
#shard_info ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo
Information about the sharding if this document is sharded part of a larger document.
-
#text ⇒ ::String
Optional.
-
#text_changes ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>
Placeholder.
-
#text_styles ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#uri ⇒ ::String
Optional.
Instance Attribute Details
#chunked_document ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument
Returns Document chunked based on chunking config.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#content ⇒ ::String
Returns Optional. Inline document content, represented as a stream of bytes.
Note: As with all bytes
fields, protobuffers use a pure binary
representation, whereas JSON representations use base64.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#document_layout ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout
Returns Parsed layout of the document.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#entities ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>
Returns A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#entity_relations ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>
Returns Placeholder. Relationship among Document.entities.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#error ⇒ ::Google::Rpc::Status
Returns Any error that occurred while processing this document.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#mime_type ⇒ ::String
Returns An IANA published media type (MIME type).
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#pages ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>
Returns Visual page layout for the Document.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#revisions ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>
Returns Placeholder. Revision history of this document.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#shard_info ⇒ ::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo
Returns Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#text ⇒ ::String
Returns Optional. UTF-8 encoded text in reading order from the document.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#text_changes ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>
Returns Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#text_styles ⇒ ::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>
This field is deprecated and may be removed in the next major version update.
Returns Styles for the Document.text.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#uri ⇒ ::String
Returns Optional. Currently supports Google Cloud Storage URI of the form
gs://bucket_name/object_name
. Object versioning is not supported.
For more information, refer to Google Cloud Storage Request
URIs.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 86 class Document include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # For a large document, sharding may be performed to produce several # document shards. Each document shard contains this field to detail which # shard it is. # @!attribute [rw] shard_index # @return [::Integer] # The 0-based index of this shard. # @!attribute [rw] shard_count # @return [::Integer] # Total number of shards. # @!attribute [rw] text_offset # @return [::Integer] # The index of the first character in # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the # overall document global text. class ShardInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Annotation for common text style attributes. This adheres to CSS # conventions as much as possible. # @!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] color # @return [::Google::Type::Color] # Text color. # @!attribute [rw] background_color # @return [::Google::Type::Color] # Text background color. # @!attribute [rw] font_weight # @return [::String] # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). # Possible values are `normal`, `bold`, `bolder`, and `lighter`. # @!attribute [rw] text_style # @return [::String] # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). # Possible values are `normal`, `italic`, and `oblique`. # @!attribute [rw] text_decoration # @return [::String] # [Text # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). # Follows CSS standard. <text-decoration-line> <text-decoration-color> # <text-decoration-style> # @!attribute [rw] font_size # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize] # Font size. # @!attribute [rw] font_family # @return [::String] # Font family such as `Arial`, `Times New Roman`. # https://www.w3schools.com/cssref/pr_font_font-family.asp class Style include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Font size with unit. # @!attribute [rw] size # @return [::Float] # Font size for the text. # @!attribute [rw] unit # @return [::String] # Unit for the font size. Follows CSS naming (such as `in`, `px`, and # `pt`). class FontSize include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}. # @!attribute [rw] page_number # @return [::Integer] # 1-based index for current # {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent # {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page # is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} # for individual processing. # @!attribute [rw] image # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image] # 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. # @!attribute [rw] transforms # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>] # Transformation matrices that were applied to the original document image # to produce # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}. # @!attribute [rw] dimension # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension] # Physical dimension of the page. # @!attribute [rw] layout # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout] # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the # page. # @!attribute [rw] detected_languages # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>] # A list of detected languages together with confidence. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>] # 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. # @!attribute [rw] paragraphs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>] # A list of visually detected text paragraphs on the page. # A collection of lines that a human would perceive as a paragraph. # @!attribute [rw] lines # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>] # A list of visually detected text lines on the page. # A collection of tokens that a human would perceive as a line. # @!attribute [rw] tokens # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>] # A list of visually detected tokens on the page. # @!attribute [rw] visual_elements # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>] # A list of detected non-text visual elements e.g. checkbox, # signature etc. on the page. # @!attribute [rw] tables # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>] # A list of visually detected tables on the page. # @!attribute [rw] form_fields # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>] # A list of visually detected form fields on the page. # @!attribute [rw] symbols # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>] # A list of visually detected symbols on the page. # @!attribute [rw] detected_barcodes # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>] # A list of detected barcodes. # @!attribute [rw] image_quality_scores # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores] # Image quality scores. # @!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 page. 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 # An entity that could be a phrase in the text or a property that belongs to # the document. It is a known entity type, such as a person, an organization, # or location. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Optional. Provenance of the entity. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] type # @return [::String] # Required. Entity type from a schema e.g. `Address`. # @!attribute [rw] mention_text # @return [::String] # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. # @!attribute [rw] mention_id # @return [::String] # Optional. Deprecated. Use `id` field instead. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected Schema entity. Range `[0, 1]`. # @!attribute [rw] page_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor] # Optional. Represents the provenance of this entity wrt. the location on # the page where it was found. # @!attribute [rw] id # @return [::String] # Optional. Canonical id. This will be a unique value in the entity list # for this document. # @!attribute [rw] normalized_value # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue] # Optional. Normalized entity value. Absent if the extracted value could # not be converted or the type (e.g. address) is not supported for certain # parsers. This field is also only populated for certain supported document # types. # @!attribute [rw] properties # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>] # Optional. Entities can be nested to form a hierarchical data structure # representing the content in the document. # @!attribute [rw] provenance # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance] # Optional. The history of this annotation. # @!attribute [rw] redacted # @return [::Boolean] # Optional. Whether the entity will be redacted for de-identification # purposes. class Entity include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Parsed and normalized entity value. # @!attribute [rw] money_value # @return [::Google::Type::Money] # Money value. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/money.proto # @!attribute [rw] date_value # @return [::Google::Type::Date] # Date value. Includes year, month, day. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/date.proto # @!attribute [rw] datetime_value # @return [::Google::Type::DateTime] # DateTime value. Includes date, time, and timezone. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto # @!attribute [rw] address_value # @return [::Google::Type::PostalAddress] # Postal address. See also: # https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto # @!attribute [rw] boolean_value # @return [::Boolean] # Boolean value. Can be used for entities with binary values, or for # checkboxes. # @!attribute [rw] integer_value # @return [::Integer] # Integer value. # @!attribute [rw] float_value # @return [::Float] # Float value. # @!attribute [rw] text # @return [::String] # Optional. An optional field to store a normalized string. # For some entity types, one of respective `structured_value` fields may # also be populated. Also not all the types of `structured_value` will be # normalized. For example, some processors may not generate `float` # or `integer` normalized text by default. # # Below are sample formats mapped to structured values. # # - Money/Currency type (`money_value`) is in the ISO 4217 text format. # - Date type (`date_value`) is in the ISO 8601 text format. # - Datetime type (`datetime_value`) is in the ISO 8601 text format. class NormalizedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Relationship between # {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}. # @!attribute [rw] subject_id # @return [::String] # Subject entity id. # @!attribute [rw] object_id # @return [::String] # Object entity id. # @!attribute [rw] relation # @return [::String] # Relationship description. class EntityRelation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Text reference indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] text_segments # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>] # The text segments from the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] content # @return [::String] # Contains the content of the text span so that users do # not have to look it up in the text_segments. It is always # populated for formFields. class TextAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A text segment in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The # indices may be out of bounds which indicate that the text extends into # another document shard for large sharded documents. See # {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset} # @!attribute [rw] start_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # start UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. # @!attribute [rw] end_index # @return [::Integer] # {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} # half open end UTF-8 char index in the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. class TextSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Referencing the visual context of the entity in the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page # anchors can be cross-page, consist of multiple bounding polygons and # optionally reference specific layout element types. # @!attribute [rw] page_refs # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>] # One or more references to visual page elements class PageAnchor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a weak reference to a page element within a document. # @!attribute [rw] page # @return [::Integer] # Required. Index into the # {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} # element, for example using # `[Document.pages][page_refs.page]` to locate the related page element. # This field is skipped when its value is the default `0`. See # https://developers.google.com/protocol-buffers/docs/proto3#json. # @!attribute [rw] layout_type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType] # Optional. The type of the layout element that is being referenced if # any. # @!attribute [rw] layout_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Optional. Deprecated. Use # {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} # instead. # @!attribute [rw] bounding_poly # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly] # Optional. Identifies the bounding polygon of a layout element on the # page. If `layout_type` is set, the bounding polygon must be exactly the # same to the layout element it's referring to. # @!attribute [rw] confidence # @return [::Float] # Optional. Confidence of detected page element, if applicable. Range # `[0, 1]`. class PageRef include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The type of layout that is being referenced. module LayoutType # Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} # element. BLOCK = 1 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} # element. PARAGRAPH = 2 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} # element. LINE = 3 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} # element. TOKEN = 4 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} # element. VISUAL_ELEMENT = 5 # Refrrences a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} # element. TABLE = 6 # References a # {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} # element. FORM_FIELD = 7 end end end # Structure to identify provenance relationships between annotations in # different revisions. # @!attribute [rw] revision # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The index of the revision that produced this element. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The Id of this operation. Needs to be unique within the scope of the # revision. # @!attribute [rw] parents # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>] # References to the original elements that are replaced. # @!attribute [rw] type # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType] # The type of provenance operation. class Provenance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The parent element the current element is based on. Used for # referencing/aligning, removal and replacement operations. # @!attribute [rw] revision # @return [::Integer] # The index of the index into current revision's parent_ids list. # @!attribute [rw] index # @return [::Integer] # The index of the parent item in the corresponding item list (eg. list # of entities, properties within entities, etc.) in the parent revision. # @!attribute [rw] id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Integer] # The id of the parent provenance. class Parent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If a processor or agent does an explicit operation on existing elements. module OperationType # Operation type unspecified. If no operation is specified a provenance # entry is simply used to match against a `parent`. OPERATION_TYPE_UNSPECIFIED = 0 # Add an element. ADD = 1 # Remove an element identified by `parent`. REMOVE = 2 # Updates any fields within the given provenance scope of the message. It # overwrites the fields rather than replacing them. Use this when you # want to update a field value of an entity without also updating all the # child properties. UPDATE = 7 # Currently unused. Replace an element identified by `parent`. REPLACE = 3 # Deprecated. Request human review for the element identified by # `parent`. EVAL_REQUESTED = 4 # Deprecated. Element is reviewed and approved at human review, # confidence will be set to 1.0. EVAL_APPROVED = 5 # Deprecated. Element is skipped in the validation process. EVAL_SKIPPED = 6 end end # Contains past or forward revisions of this document. # @!attribute [rw] agent # @return [::String] # If the change was made by a person specify the name or id of that # person. # @!attribute [rw] processor # @return [::String] # If the annotation was made by processor identify the processor by its # resource name. # @!attribute [rw] id # @return [::String] # Id of the revision, internally generated by doc proto storage. # Unique within the context of the document. # @!attribute [rw] parent # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Integer>] # The revisions that this revision is based on. This can include one or # more parent (when documents are merged.) This field represents the # index into the `revisions` field. # @!attribute [rw] parent_ids # @return [::Array<::String>] # The revisions that this revision is based on. Must include all the ids # that have anything to do with this revision - eg. there are # `provenance.parent.revision` fields that index into this field. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # The time that the revision was created, internally generated by # doc proto storage at the time of create. # @!attribute [rw] human_review # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview] # Human Review information of this revision. class Revision include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Human Review information of the document. # @!attribute [rw] state # @return [::String] # Human review state. e.g. `requested`, `succeeded`, `rejected`. # @!attribute [rw] state_message # @return [::String] # A message providing more details about the current state of processing. # For example, the rejection reason when the state is `rejected`. class HumanReview include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # This message is used for text changes aka. OCR corrections. # @!attribute [rw] text_anchor # @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor] # Provenance of the correction. # Text anchor indexing into the # {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There # can only be a single `TextAnchor.text_segments` element. If the start # and end index of the text segment are the same, the text change is # inserted before that index. # @!attribute [rw] changed_text # @return [::String] # The text that replaces the text identified in the `text_anchor`. # @!attribute [rw] provenance # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>] # The history of this annotation. class TextChange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the parsed layout of a document as a collection of blocks that # the document is divided into. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # List of blocks in the document. class DocumentLayout include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a block. A block could be one of the various types (text, # table, list) supported. # @!attribute [rw] text_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock] # Block consisting of text content. # @!attribute [rw] table_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock] # Block consisting of table content/structure. # @!attribute [rw] list_block # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock] # Block consisting of list content/structure. # @!attribute [rw] block_id # @return [::String] # ID of the block. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutPageSpan] # Page span of the block. class DocumentLayoutBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the block starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where block starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where block ends in the document. class LayoutPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a text type block. # @!attribute [rw] text # @return [::String] # Text content stored in the block. # @!attribute [rw] type # @return [::String] # Type of the text in the block. Available options are: `paragraph`, # `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, # `heading-5`, `header`, `footer`. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A text block could further have child blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutTextBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a table type block. # @!attribute [rw] header_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Header rows at the top of the table. # @!attribute [rw] body_rows # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableRow>] # Body rows containing main table content. # @!attribute [rw] caption # @return [::String] # Table caption/title. class LayoutTableBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a row in a table. # @!attribute [rw] cells # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableCell>] # A table row is a list of table cells. class LayoutTableRow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a cell in a table row. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A table cell is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. # @!attribute [rw] row_span # @return [::Integer] # How many rows this cell spans. # @!attribute [rw] col_span # @return [::Integer] # How many columns this cell spans. class LayoutTableCell include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a list type block. # @!attribute [rw] list_entries # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock::LayoutListEntry>] # List entries that constitute a list block. # @!attribute [rw] type # @return [::String] # Type of the list_entries (if exist). Available options are `ordered` # and `unordered`. class LayoutListBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents an entry in the list. # @!attribute [rw] blocks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::DocumentLayout::DocumentLayoutBlock>] # A list entry is a list of blocks. # Repeated blocks support further hierarchies and nested blocks. class LayoutListEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Represents the chunks that the document is divided into. # @!attribute [rw] chunks # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk>] # List of chunks. class ChunkedDocument include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a chunk. # @!attribute [rw] chunk_id # @return [::String] # ID of the chunk. # @!attribute [rw] source_block_ids # @return [::Array<::String>] # Unused. # @!attribute [rw] content # @return [::String] # Text content of the chunk. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the chunk. # @!attribute [rw] page_headers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>] # Page headers associated with the chunk. # @!attribute [rw] page_footers # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>] # Page footers associated with the chunk. class Chunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents where the chunk starts and ends in the document. # @!attribute [rw] page_start # @return [::Integer] # Page where chunk starts in the document. # @!attribute [rw] page_end # @return [::Integer] # Page where chunk ends in the document. class ChunkPageSpan include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page header associated with the chunk. # @!attribute [rw] text # @return [::String] # Header in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the header. class ChunkPageHeader include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the page footer associated with the chunk. # @!attribute [rw] text # @return [::String] # Footer in text format. # @!attribute [rw] page_span # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan] # Page span of the footer. class ChunkPageFooter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |