google-cloud-document_ai-v1beta3 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +1407 -153
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb +44 -0
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/barcode_pb.rb +24 -0
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +2 -1
- data/lib/google/cloud/documentai/v1beta3/document_pb.rb +25 -1
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +142 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +32 -1
- data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +60 -0
- data/lib/google/cloud/documentai/v1beta3/evaluation_pb.rb +72 -0
- data/lib/google/cloud/documentai/v1beta3/geometry_pb.rb +0 -2
- data/lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +29 -2
- data/lib/google/cloud/documentai/v1beta3/processor_type_pb.rb +2 -1
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/documentai/v1beta3/barcode.rb +73 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document.rb +162 -145
- data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +7 -2
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +382 -10
- data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +155 -0
- data/proto_docs/google/cloud/documentai/v1beta3/evaluation.rb +181 -0
- data/proto_docs/google/cloud/documentai/v1beta3/operation_metadata.rb +3 -0
- data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +97 -9
- data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +9 -6
- data/proto_docs/google/protobuf/empty.rb +0 -2
- metadata +32 -4
@@ -21,11 +21,10 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module DocumentAI
|
23
23
|
module V1beta3
|
24
|
-
# Document represents the canonical document resource in Document
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
# optimize for quality.
|
24
|
+
# Document represents the canonical document resource in Document AI. It is an
|
25
|
+
# interchange format that provides insights into documents and allows for
|
26
|
+
# collaboration between users and Document AI to iterate and optimize for
|
27
|
+
# quality.
|
29
28
|
# @!attribute [rw] uri
|
30
29
|
# @return [::String]
|
31
30
|
# Optional. Currently supports Google Cloud Storage URI of the form
|
@@ -48,26 +47,22 @@ module Google
|
|
48
47
|
# Optional. UTF-8 encoded text in reading order from the document.
|
49
48
|
# @!attribute [rw] text_styles
|
50
49
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>]
|
51
|
-
# Placeholder. Styles for the
|
52
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
50
|
+
# Placeholder. Styles for the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
53
51
|
# @!attribute [rw] pages
|
54
52
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>]
|
55
|
-
# Visual page layout for the
|
56
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
53
|
+
# Visual page layout for the {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
57
54
|
# @!attribute [rw] entities
|
58
55
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>]
|
59
|
-
# A list of entities detected on
|
60
|
-
#
|
61
|
-
# document shards, entities in this list may cross shard boundaries.
|
56
|
+
# A list of entities detected on {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. For document shards,
|
57
|
+
# entities in this list may cross shard boundaries.
|
62
58
|
# @!attribute [rw] entity_relations
|
63
59
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>]
|
64
|
-
# Placeholder. Relationship among
|
65
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#entities Document.entities}.
|
60
|
+
# Placeholder. Relationship among {::Google::Cloud::DocumentAI::V1beta3::Document#entities Document.entities}.
|
66
61
|
# @!attribute [rw] text_changes
|
67
62
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>]
|
68
|
-
# Placeholder. A list of text corrections made to
|
69
|
-
# usually used for annotating corrections to OCR mistakes. Text changes
|
70
|
-
# a given revision may not overlap with each other.
|
63
|
+
# Placeholder. A list of text corrections made to {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. This
|
64
|
+
# is usually used for annotating corrections to OCR mistakes. Text changes
|
65
|
+
# for a given revision may not overlap with each other.
|
71
66
|
# @!attribute [rw] shard_info
|
72
67
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo]
|
73
68
|
# Information about the sharding if this document is sharded part of a larger
|
@@ -93,9 +88,8 @@ module Google
|
|
93
88
|
# Total number of shards.
|
94
89
|
# @!attribute [rw] text_offset
|
95
90
|
# @return [::Integer]
|
96
|
-
# The index of the first character in
|
97
|
-
#
|
98
|
-
# overall document global text.
|
91
|
+
# The index of the first character in {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the overall
|
92
|
+
# document global text.
|
99
93
|
class ShardInfo
|
100
94
|
include ::Google::Protobuf::MessageExts
|
101
95
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -105,8 +99,7 @@ module Google
|
|
105
99
|
# conventions as much as possible.
|
106
100
|
# @!attribute [rw] text_anchor
|
107
101
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
108
|
-
# Text anchor indexing into the
|
109
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
102
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
110
103
|
# @!attribute [rw] color
|
111
104
|
# @return [::Google::Type::Color]
|
112
105
|
# Text color.
|
@@ -129,6 +122,10 @@ module Google
|
|
129
122
|
# @!attribute [rw] font_size
|
130
123
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize]
|
131
124
|
# Font size.
|
125
|
+
# @!attribute [rw] font_family
|
126
|
+
# @return [::String]
|
127
|
+
# Font family such as `Arial`, `Times New Roman`.
|
128
|
+
# https://www.w3schools.com/cssref/pr_font_font-family.asp
|
132
129
|
class Style
|
133
130
|
include ::Google::Protobuf::MessageExts
|
134
131
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -149,11 +146,9 @@ module Google
|
|
149
146
|
# A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
150
147
|
# @!attribute [rw] page_number
|
151
148
|
# @return [::Integer]
|
152
|
-
# 1-based index for current
|
153
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document
|
154
|
-
#
|
155
|
-
# is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document}
|
156
|
-
# for individual processing.
|
149
|
+
# 1-based index for current {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
150
|
+
# Useful when a page is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} for individual
|
151
|
+
# processing.
|
157
152
|
# @!attribute [rw] image
|
158
153
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image]
|
159
154
|
# Rendered image for this page. This image is preprocessed to remove any
|
@@ -162,15 +157,13 @@ module Google
|
|
162
157
|
# @!attribute [rw] transforms
|
163
158
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>]
|
164
159
|
# Transformation matrices that were applied to the original document image
|
165
|
-
# to produce
|
166
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}.
|
160
|
+
# to produce {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}.
|
167
161
|
# @!attribute [rw] dimension
|
168
162
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension]
|
169
163
|
# Physical dimension of the page.
|
170
164
|
# @!attribute [rw] layout
|
171
165
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
172
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
173
|
-
# page.
|
166
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the page.
|
174
167
|
# @!attribute [rw] detected_languages
|
175
168
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
176
169
|
# A list of detected languages together with confidence.
|
@@ -203,6 +196,12 @@ module Google
|
|
203
196
|
# @!attribute [rw] symbols
|
204
197
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>]
|
205
198
|
# A list of visually detected symbols on the page.
|
199
|
+
# @!attribute [rw] detected_barcodes
|
200
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>]
|
201
|
+
# A list of detected barcodes.
|
202
|
+
# @!attribute [rw] image_quality_scores
|
203
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores]
|
204
|
+
# Image Quality Scores.
|
206
205
|
# @!attribute [rw] provenance
|
207
206
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
208
207
|
# The history of this page.
|
@@ -268,23 +267,18 @@ module Google
|
|
268
267
|
# Visual element describing a layout unit on a page.
|
269
268
|
# @!attribute [rw] text_anchor
|
270
269
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
271
|
-
# Text anchor indexing into the
|
272
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
270
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
273
271
|
# @!attribute [rw] confidence
|
274
272
|
# @return [::Float]
|
275
|
-
# Confidence of the current
|
276
|
-
#
|
277
|
-
#
|
278
|
-
# single token, a table, a visual element, etc. depending on context.
|
279
|
-
# Range [0, 1].
|
273
|
+
# Confidence of the current {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within context of the object this
|
274
|
+
# layout is for. e.g. confidence can be for a single token, a table,
|
275
|
+
# a visual element, etc. depending on context. Range `[0, 1]`.
|
280
276
|
# @!attribute [rw] bounding_poly
|
281
277
|
# @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
|
282
|
-
# The bounding polygon for the
|
283
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
278
|
+
# The bounding polygon for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
284
279
|
# @!attribute [rw] orientation
|
285
280
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation]
|
286
|
-
# Detected orientation for the
|
287
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
281
|
+
# Detected orientation for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
288
282
|
class Layout
|
289
283
|
include ::Google::Protobuf::MessageExts
|
290
284
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -315,8 +309,7 @@ module Google
|
|
315
309
|
# common line-spacing and orientation.
|
316
310
|
# @!attribute [rw] layout
|
317
311
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
318
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
319
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}.
|
312
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}.
|
320
313
|
# @!attribute [rw] detected_languages
|
321
314
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
322
315
|
# A list of detected languages together with confidence.
|
@@ -331,8 +324,7 @@ module Google
|
|
331
324
|
# A collection of lines that a human would perceive as a paragraph.
|
332
325
|
# @!attribute [rw] layout
|
333
326
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
334
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
335
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}.
|
327
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}.
|
336
328
|
# @!attribute [rw] detected_languages
|
337
329
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
338
330
|
# A list of detected languages together with confidence.
|
@@ -348,8 +340,7 @@ module Google
|
|
348
340
|
# Does not cross column boundaries, can be horizontal, vertical, etc.
|
349
341
|
# @!attribute [rw] layout
|
350
342
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
351
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
352
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}.
|
343
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}.
|
353
344
|
# @!attribute [rw] detected_languages
|
354
345
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
355
346
|
# A list of detected languages together with confidence.
|
@@ -364,24 +355,21 @@ module Google
|
|
364
355
|
# A detected token.
|
365
356
|
# @!attribute [rw] layout
|
366
357
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
367
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
368
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
358
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
369
359
|
# @!attribute [rw] detected_break
|
370
360
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak]
|
371
|
-
# Detected break at the end of a
|
372
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
361
|
+
# Detected break at the end of a {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
373
362
|
# @!attribute [rw] detected_languages
|
374
363
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
375
364
|
# A list of detected languages together with confidence.
|
376
365
|
# @!attribute [rw] provenance
|
377
366
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
378
|
-
# The
|
367
|
+
# The history of this annotation.
|
379
368
|
class Token
|
380
369
|
include ::Google::Protobuf::MessageExts
|
381
370
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
382
371
|
|
383
|
-
# Detected break at the end of a
|
384
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
372
|
+
# Detected break at the end of a {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
385
373
|
# @!attribute [rw] type
|
386
374
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
|
387
375
|
# Detected break type.
|
@@ -409,8 +397,7 @@ module Google
|
|
409
397
|
# A detected symbol.
|
410
398
|
# @!attribute [rw] layout
|
411
399
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
412
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
413
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}.
|
400
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}.
|
414
401
|
# @!attribute [rw] detected_languages
|
415
402
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
416
403
|
# A list of detected languages together with confidence.
|
@@ -423,12 +410,10 @@ module Google
|
|
423
410
|
# page.
|
424
411
|
# @!attribute [rw] layout
|
425
412
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
426
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
427
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
413
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
428
414
|
# @!attribute [rw] type
|
429
415
|
# @return [::String]
|
430
|
-
# Type of the
|
431
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
416
|
+
# Type of the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
432
417
|
# @!attribute [rw] detected_languages
|
433
418
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
434
419
|
# A list of detected languages together with confidence.
|
@@ -440,8 +425,7 @@ module Google
|
|
440
425
|
# A table representation similar to HTML table structure.
|
441
426
|
# @!attribute [rw] layout
|
442
427
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
443
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
444
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}.
|
428
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}.
|
445
429
|
# @!attribute [rw] header_rows
|
446
430
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>]
|
447
431
|
# Header rows of the table.
|
@@ -451,6 +435,9 @@ module Google
|
|
451
435
|
# @!attribute [rw] detected_languages
|
452
436
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
453
437
|
# A list of detected languages together with confidence.
|
438
|
+
# @!attribute [rw] provenance
|
439
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
440
|
+
# The history of this table.
|
454
441
|
class Table
|
455
442
|
include ::Google::Protobuf::MessageExts
|
456
443
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -467,8 +454,7 @@ module Google
|
|
467
454
|
# A cell representation inside the table.
|
468
455
|
# @!attribute [rw] layout
|
469
456
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
470
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
471
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}.
|
457
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}.
|
472
458
|
# @!attribute [rw] row_span
|
473
459
|
# @return [::Integer]
|
474
460
|
# How many rows this cell spans.
|
@@ -487,14 +473,11 @@ module Google
|
|
487
473
|
# A form field detected on the page.
|
488
474
|
# @!attribute [rw] field_name
|
489
475
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
490
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
491
|
-
#
|
492
|
-
# name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
|
476
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} name. e.g. `Address`, `Email`,
|
477
|
+
# `Grand total`, `Phone number`, etc.
|
493
478
|
# @!attribute [rw] field_value
|
494
479
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
495
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
496
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField}
|
497
|
-
# value.
|
480
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} value.
|
498
481
|
# @!attribute [rw] name_detected_languages
|
499
482
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
500
483
|
# A list of detected languages for name together with confidence.
|
@@ -508,6 +491,16 @@ module Google
|
|
508
491
|
# - blank (this indicates the field_value is normal text)
|
509
492
|
# - "unfilled_checkbox"
|
510
493
|
# - "filled_checkbox"
|
494
|
+
# @!attribute [rw] corrected_key_text
|
495
|
+
# @return [::String]
|
496
|
+
# Created for Labeling UI to export key text.
|
497
|
+
# If corrections were made to the text identified by the
|
498
|
+
# `field_name.text_anchor`, this field will contain the correction.
|
499
|
+
# @!attribute [rw] corrected_value_text
|
500
|
+
# @return [::String]
|
501
|
+
# Created for Labeling UI to export value text.
|
502
|
+
# If corrections were made to the text identified by the
|
503
|
+
# `field_value.text_anchor`, this field will contain the correction.
|
511
504
|
# @!attribute [rw] provenance
|
512
505
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
513
506
|
# The history of this annotation.
|
@@ -516,19 +509,65 @@ module Google
|
|
516
509
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
517
510
|
end
|
518
511
|
|
512
|
+
# A detected barcode.
|
513
|
+
# @!attribute [rw] layout
|
514
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
515
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}.
|
516
|
+
# @!attribute [rw] barcode
|
517
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Barcode]
|
518
|
+
# Detailed barcode information of the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}.
|
519
|
+
class DetectedBarcode
|
520
|
+
include ::Google::Protobuf::MessageExts
|
521
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
522
|
+
end
|
523
|
+
|
519
524
|
# Detected language for a structural component.
|
520
525
|
# @!attribute [rw] language_code
|
521
526
|
# @return [::String]
|
522
|
-
# The BCP-47 language code, such as
|
527
|
+
# The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
|
523
528
|
# information, see
|
524
529
|
# https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
525
530
|
# @!attribute [rw] confidence
|
526
531
|
# @return [::Float]
|
527
|
-
# Confidence of detected language. Range [0, 1]
|
532
|
+
# Confidence of detected language. Range `[0, 1]`.
|
528
533
|
class DetectedLanguage
|
529
534
|
include ::Google::Protobuf::MessageExts
|
530
535
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
531
536
|
end
|
537
|
+
|
538
|
+
# Image Quality Scores for the page image
|
539
|
+
# @!attribute [rw] quality_score
|
540
|
+
# @return [::Float]
|
541
|
+
# The overall quality score. Range `[0, 1]` where 1 is perfect quality.
|
542
|
+
# @!attribute [rw] detected_defects
|
543
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>]
|
544
|
+
# A list of detected defects.
|
545
|
+
class ImageQualityScores
|
546
|
+
include ::Google::Protobuf::MessageExts
|
547
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
548
|
+
|
549
|
+
# Image Quality Defects
|
550
|
+
# @!attribute [rw] type
|
551
|
+
# @return [::String]
|
552
|
+
# Name of the defect type. Supported values are:
|
553
|
+
#
|
554
|
+
# - `quality/defect_blurry`
|
555
|
+
# - `quality/defect_noisy`
|
556
|
+
# - `quality/defect_dark`
|
557
|
+
# - `quality/defect_faint`
|
558
|
+
# - `quality/defect_text_too_small`
|
559
|
+
# - `quality/defect_document_cutoff`
|
560
|
+
# - `quality/defect_text_cutoff`
|
561
|
+
# - `quality/defect_glare`
|
562
|
+
# @!attribute [rw] confidence
|
563
|
+
# @return [::Float]
|
564
|
+
# Confidence of detected defect. Range `[0, 1]` where 1 indicates
|
565
|
+
# strong confidence of that the defect exists.
|
566
|
+
class DetectedDefect
|
567
|
+
include ::Google::Protobuf::MessageExts
|
568
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
569
|
+
end
|
570
|
+
end
|
532
571
|
end
|
533
572
|
|
534
573
|
# An entity that could be a phrase in the text or a property that belongs to
|
@@ -537,46 +576,43 @@ module Google
|
|
537
576
|
# @!attribute [rw] text_anchor
|
538
577
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
539
578
|
# Optional. Provenance of the entity.
|
540
|
-
# Text anchor indexing into the
|
541
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
579
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
542
580
|
# @!attribute [rw] type
|
543
581
|
# @return [::String]
|
544
582
|
# Required. Entity type from a schema e.g. `Address`.
|
545
583
|
# @!attribute [rw] mention_text
|
546
584
|
# @return [::String]
|
547
|
-
# Optional. Text value
|
548
|
-
# the entity is not present in the document, this field will be empty.
|
585
|
+
# Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
|
549
586
|
# @!attribute [rw] mention_id
|
550
587
|
# @return [::String]
|
551
588
|
# Optional. Deprecated. Use `id` field instead.
|
552
589
|
# @!attribute [rw] confidence
|
553
590
|
# @return [::Float]
|
554
|
-
# Optional. Confidence of detected Schema entity. Range [0, 1]
|
591
|
+
# Optional. Confidence of detected Schema entity. Range `[0, 1]`.
|
555
592
|
# @!attribute [rw] page_anchor
|
556
593
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor]
|
557
|
-
# Optional. Represents the provenance of this entity wrt. the location on
|
558
|
-
#
|
594
|
+
# Optional. Represents the provenance of this entity wrt. the location on the
|
595
|
+
# page where it was found.
|
559
596
|
# @!attribute [rw] id
|
560
597
|
# @return [::String]
|
561
598
|
# Optional. Canonical id. This will be a unique value in the entity list
|
562
599
|
# for this document.
|
563
600
|
# @!attribute [rw] normalized_value
|
564
601
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue]
|
565
|
-
# Optional. Normalized entity value. Absent if the extracted value could
|
566
|
-
#
|
602
|
+
# Optional. Normalized entity value. Absent if the extracted value could not be
|
603
|
+
# converted or the type (e.g. address) is not supported for certain
|
567
604
|
# parsers. This field is also only populated for certain supported document
|
568
605
|
# types.
|
569
606
|
# @!attribute [rw] properties
|
570
607
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>]
|
571
|
-
# Optional. Entities can be nested to form a hierarchical data structure
|
572
|
-
#
|
608
|
+
# Optional. Entities can be nested to form a hierarchical data structure representing
|
609
|
+
# the content in the document.
|
573
610
|
# @!attribute [rw] provenance
|
574
611
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
575
612
|
# Optional. The history of this annotation.
|
576
613
|
# @!attribute [rw] redacted
|
577
614
|
# @return [::Boolean]
|
578
|
-
# Optional. Whether the entity will be redacted for de-identification
|
579
|
-
# purposes.
|
615
|
+
# Optional. Whether the entity will be redacted for de-identification purposes.
|
580
616
|
class Entity
|
581
617
|
include ::Google::Protobuf::MessageExts
|
582
618
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -602,6 +638,12 @@ module Google
|
|
602
638
|
# @return [::Boolean]
|
603
639
|
# Boolean value. Can be used for entities with binary values, or for
|
604
640
|
# checkboxes.
|
641
|
+
# @!attribute [rw] integer_value
|
642
|
+
# @return [::Integer]
|
643
|
+
# Integer value.
|
644
|
+
# @!attribute [rw] float_value
|
645
|
+
# @return [::Float]
|
646
|
+
# Float value.
|
605
647
|
# @!attribute [rw] text
|
606
648
|
# @return [::String]
|
607
649
|
# Optional. An optional field to store a normalized string.
|
@@ -611,6 +653,7 @@ module Google
|
|
611
653
|
# or int normalized text by default.
|
612
654
|
#
|
613
655
|
# Below are sample formats mapped to structured values.
|
656
|
+
#
|
614
657
|
# - Money/Currency type (`money_value`) is in the ISO 4217 text format.
|
615
658
|
# - Date type (`date_value`) is in the ISO 8601 text format.
|
616
659
|
# - Datetime type (`datetime_value`) is in the ISO 8601 text format.
|
@@ -620,8 +663,7 @@ module Google
|
|
620
663
|
end
|
621
664
|
end
|
622
665
|
|
623
|
-
# Relationship between
|
624
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}.
|
666
|
+
# Relationship between {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}.
|
625
667
|
# @!attribute [rw] subject_id
|
626
668
|
# @return [::String]
|
627
669
|
# Subject entity id.
|
@@ -636,12 +678,10 @@ module Google
|
|
636
678
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
637
679
|
end
|
638
680
|
|
639
|
-
# Text reference indexing into the
|
640
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
681
|
+
# Text reference indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
641
682
|
# @!attribute [rw] text_segments
|
642
683
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>]
|
643
|
-
# The text segments from the
|
644
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
684
|
+
# The text segments from the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
645
685
|
# @!attribute [rw] content
|
646
686
|
# @return [::String]
|
647
687
|
# Contains the content of the text span so that users do
|
@@ -651,20 +691,15 @@ module Google
|
|
651
691
|
include ::Google::Protobuf::MessageExts
|
652
692
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
653
693
|
|
654
|
-
# A text segment in the
|
655
|
-
#
|
656
|
-
#
|
657
|
-
# another document shard for large sharded documents. See
|
658
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
694
|
+
# A text segment in the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The indices may be out of bounds
|
695
|
+
# which indicate that the text extends into another document shard for
|
696
|
+
# large sharded documents. See {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
659
697
|
# @!attribute [rw] start_index
|
660
698
|
# @return [::Integer]
|
661
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
|
662
|
-
# start UTF-8 char index in the
|
663
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
699
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} start UTF-8 char index in the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
664
700
|
# @!attribute [rw] end_index
|
665
701
|
# @return [::Integer]
|
666
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
|
667
|
-
# half open end UTF-8 char index in the
|
702
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} half open end UTF-8 char index in the
|
668
703
|
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
669
704
|
class TextSegment
|
670
705
|
include ::Google::Protobuf::MessageExts
|
@@ -672,9 +707,8 @@ module Google
|
|
672
707
|
end
|
673
708
|
end
|
674
709
|
|
675
|
-
# Referencing the visual context of the entity in the
|
676
|
-
#
|
677
|
-
# anchors can be cross-page, consist of multiple bounding polygons and
|
710
|
+
# Referencing the visual context of the entity in the {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}.
|
711
|
+
# Page anchors can be cross-page, consist of multiple bounding polygons and
|
678
712
|
# optionally reference specific layout element types.
|
679
713
|
# @!attribute [rw] page_refs
|
680
714
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>]
|
@@ -686,29 +720,22 @@ module Google
|
|
686
720
|
# Represents a weak reference to a page element within a document.
|
687
721
|
# @!attribute [rw] page
|
688
722
|
# @return [::Integer]
|
689
|
-
# Required. Index into the
|
690
|
-
#
|
691
|
-
#
|
692
|
-
# the related page element. This field is skipped when its value is the
|
693
|
-
# default 0. See
|
723
|
+
# Required. Index into the {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} element, for example using
|
724
|
+
# [Document.pages][page_refs.page] to locate the related page element.
|
725
|
+
# This field is skipped when its value is the default 0. See
|
694
726
|
# https://developers.google.com/protocol-buffers/docs/proto3#json.
|
695
727
|
# @!attribute [rw] layout_type
|
696
728
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType]
|
697
|
-
# Optional. The type of the layout element that is being referenced if
|
698
|
-
# any.
|
729
|
+
# Optional. The type of the layout element that is being referenced if any.
|
699
730
|
# @!attribute [rw] layout_id
|
700
731
|
# @return [::String]
|
701
|
-
# Optional. Deprecated. Use
|
702
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly}
|
703
|
-
# instead.
|
732
|
+
# Optional. Deprecated. Use {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} instead.
|
704
733
|
# @!attribute [rw] bounding_poly
|
705
734
|
# @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
|
706
|
-
# Optional. Identifies the bounding polygon of a layout element on the
|
707
|
-
# page.
|
735
|
+
# Optional. Identifies the bounding polygon of a layout element on the page.
|
708
736
|
# @!attribute [rw] confidence
|
709
737
|
# @return [::Float]
|
710
|
-
# Optional. Confidence of detected page element, if applicable. Range [0,
|
711
|
-
# 1].
|
738
|
+
# Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
|
712
739
|
class PageRef
|
713
740
|
include ::Google::Protobuf::MessageExts
|
714
741
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -718,39 +745,25 @@ module Google
|
|
718
745
|
# Layout Unspecified.
|
719
746
|
LAYOUT_TYPE_UNSPECIFIED = 0
|
720
747
|
|
721
|
-
# References a
|
722
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks}
|
723
|
-
# element.
|
748
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} element.
|
724
749
|
BLOCK = 1
|
725
750
|
|
726
|
-
# References a
|
727
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs}
|
728
|
-
# element.
|
751
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} element.
|
729
752
|
PARAGRAPH = 2
|
730
753
|
|
731
|
-
# References a
|
732
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines}
|
733
|
-
# element.
|
754
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} element.
|
734
755
|
LINE = 3
|
735
756
|
|
736
|
-
# References a
|
737
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens}
|
738
|
-
# element.
|
757
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} element.
|
739
758
|
TOKEN = 4
|
740
759
|
|
741
|
-
# References a
|
742
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements}
|
743
|
-
# element.
|
760
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} element.
|
744
761
|
VISUAL_ELEMENT = 5
|
745
762
|
|
746
|
-
# Refrrences a
|
747
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables}
|
748
|
-
# element.
|
763
|
+
# Refrrences a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} element.
|
749
764
|
TABLE = 6
|
750
765
|
|
751
|
-
# References a
|
752
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields}
|
753
|
-
# element.
|
766
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} element.
|
754
767
|
FORM_FIELD = 7
|
755
768
|
end
|
756
769
|
end
|
@@ -836,6 +849,11 @@ module Google
|
|
836
849
|
# The revisions that this revision is based on. This can include one or
|
837
850
|
# more parent (when documents are merged.) This field represents the
|
838
851
|
# index into the `revisions` field.
|
852
|
+
# @!attribute [rw] parent_ids
|
853
|
+
# @return [::Array<::String>]
|
854
|
+
# The revisions that this revision is based on. Must include all the ids
|
855
|
+
# that have anything to do with this revision - eg. there are
|
856
|
+
# `provenance.parent.revision` fields that index into this field.
|
839
857
|
# @!attribute [rw] create_time
|
840
858
|
# @return [::Google::Protobuf::Timestamp]
|
841
859
|
# The time that the revision was created.
|
@@ -864,11 +882,10 @@ module Google
|
|
864
882
|
# @!attribute [rw] text_anchor
|
865
883
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
866
884
|
# Provenance of the correction.
|
867
|
-
# Text anchor indexing into the
|
868
|
-
#
|
869
|
-
#
|
870
|
-
#
|
871
|
-
# inserted before that index.
|
885
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There can only be a
|
886
|
+
# single `TextAnchor.text_segments` element. If the start and
|
887
|
+
# end index of the text segment are the same, the text change is inserted
|
888
|
+
# before that index.
|
872
889
|
# @!attribute [rw] changed_text
|
873
890
|
# @return [::String]
|
874
891
|
# The text that replaces the text identified in the `text_anchor`.
|