google-cloud-document_ai-v1 0.2.1 → 0.3.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/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +113 -48
- data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +145 -33
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/documentai/v1/document_io_pb.rb +1 -1
- data/lib/google/cloud/documentai/v1/document_pb.rb +9 -3
- data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +3 -2
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +1 -1
- data/lib/google/cloud/documentai/v1/geometry_pb.rb +1 -1
- data/lib/google/cloud/documentai/v1/operation_metadata_pb.rb +2 -2
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/documentai/v1/document.rb +158 -81
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +3 -0
- metadata +5 -5
@@ -54,11 +54,13 @@ module Google
|
|
54
54
|
# Visual page layout for the {::Google::Cloud::DocumentAI::V1::Document Document}.
|
55
55
|
# @!attribute [rw] entities
|
56
56
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
|
57
|
-
# A list of entities detected on
|
58
|
-
#
|
57
|
+
# A list of entities detected on
|
58
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. For document
|
59
|
+
# shards, entities in this list may cross shard boundaries.
|
59
60
|
# @!attribute [rw] entity_relations
|
60
61
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::EntityRelation>]
|
61
|
-
# Relationship among
|
62
|
+
# Relationship among
|
63
|
+
# {::Google::Cloud::DocumentAI::V1::Document#entities Document.entities}.
|
62
64
|
# @!attribute [rw] text_changes
|
63
65
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextChange>]
|
64
66
|
# A list of text corrections made to [Document.text]. This is usually
|
@@ -89,7 +91,8 @@ module Google
|
|
89
91
|
# Total number of shards.
|
90
92
|
# @!attribute [rw] text_offset
|
91
93
|
# @return [::Integer]
|
92
|
-
# The index of the first character in
|
94
|
+
# The index of the first character in
|
95
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text} in the overall
|
93
96
|
# document global text.
|
94
97
|
class ShardInfo
|
95
98
|
include ::Google::Protobuf::MessageExts
|
@@ -100,7 +103,8 @@ module Google
|
|
100
103
|
# conventions as much as possible.
|
101
104
|
# @!attribute [rw] text_anchor
|
102
105
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
103
|
-
# Text anchor indexing into the
|
106
|
+
# Text anchor indexing into the
|
107
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
104
108
|
# @!attribute [rw] color
|
105
109
|
# @return [::Google::Type::Color]
|
106
110
|
# Text color.
|
@@ -143,9 +147,11 @@ module Google
|
|
143
147
|
# A page in a {::Google::Cloud::DocumentAI::V1::Document Document}.
|
144
148
|
# @!attribute [rw] page_number
|
145
149
|
# @return [::Integer]
|
146
|
-
# 1-based index for current
|
147
|
-
#
|
148
|
-
#
|
150
|
+
# 1-based index for current
|
151
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page Page} in a parent
|
152
|
+
# {::Google::Cloud::DocumentAI::V1::Document Document}. Useful when a page is
|
153
|
+
# taken out of a {::Google::Cloud::DocumentAI::V1::Document Document} for
|
154
|
+
# individual processing.
|
149
155
|
# @!attribute [rw] image
|
150
156
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Image]
|
151
157
|
# Rendered image for this page. This image is preprocessed to remove any
|
@@ -190,6 +196,9 @@ module Google
|
|
190
196
|
# @!attribute [rw] form_fields
|
191
197
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::FormField>]
|
192
198
|
# A list of visually detected form fields on the page.
|
199
|
+
# @!attribute [rw] symbols
|
200
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::Symbol>]
|
201
|
+
# A list of visually detected symbols on the page.
|
193
202
|
# @!attribute [rw] provenance
|
194
203
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
|
195
204
|
# The history of this page.
|
@@ -255,18 +264,23 @@ module Google
|
|
255
264
|
# Visual element describing a layout unit on a page.
|
256
265
|
# @!attribute [rw] text_anchor
|
257
266
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
258
|
-
# Text anchor indexing into the
|
267
|
+
# Text anchor indexing into the
|
268
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
259
269
|
# @!attribute [rw] confidence
|
260
270
|
# @return [::Float]
|
261
|
-
# Confidence of the current
|
262
|
-
#
|
263
|
-
#
|
271
|
+
# Confidence of the current
|
272
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} within
|
273
|
+
# context of the object this layout is for. e.g. confidence can be for a
|
274
|
+
# single token, a table, a visual element, etc. depending on context.
|
275
|
+
# Range [0, 1].
|
264
276
|
# @!attribute [rw] bounding_poly
|
265
277
|
# @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
|
266
|
-
# The bounding polygon for the
|
278
|
+
# The bounding polygon for the
|
279
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
267
280
|
# @!attribute [rw] orientation
|
268
281
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout::Orientation]
|
269
|
-
# Detected orientation for the
|
282
|
+
# Detected orientation for the
|
283
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
270
284
|
class Layout
|
271
285
|
include ::Google::Protobuf::MessageExts
|
272
286
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,7 +311,8 @@ module Google
|
|
297
311
|
# common line-spacing and orientation.
|
298
312
|
# @!attribute [rw] layout
|
299
313
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
300
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
314
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
315
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Block Block}.
|
301
316
|
# @!attribute [rw] detected_languages
|
302
317
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
303
318
|
# A list of detected languages together with confidence.
|
@@ -312,7 +327,8 @@ module Google
|
|
312
327
|
# A collection of lines that a human would perceive as a paragraph.
|
313
328
|
# @!attribute [rw] layout
|
314
329
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
315
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
330
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
331
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Paragraph Paragraph}.
|
316
332
|
# @!attribute [rw] detected_languages
|
317
333
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
318
334
|
# A list of detected languages together with confidence.
|
@@ -328,7 +344,8 @@ module Google
|
|
328
344
|
# Does not cross column boundaries, can be horizontal, vertical, etc.
|
329
345
|
# @!attribute [rw] layout
|
330
346
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
331
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
347
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
348
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Line Line}.
|
332
349
|
# @!attribute [rw] detected_languages
|
333
350
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
334
351
|
# A list of detected languages together with confidence.
|
@@ -343,10 +360,12 @@ module Google
|
|
343
360
|
# A detected token.
|
344
361
|
# @!attribute [rw] layout
|
345
362
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
346
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
363
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
364
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
347
365
|
# @!attribute [rw] detected_break
|
348
366
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak]
|
349
|
-
# Detected break at the end of a
|
367
|
+
# Detected break at the end of a
|
368
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
350
369
|
# @!attribute [rw] detected_languages
|
351
370
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
352
371
|
# A list of detected languages together with confidence.
|
@@ -357,7 +376,8 @@ module Google
|
|
357
376
|
include ::Google::Protobuf::MessageExts
|
358
377
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
359
378
|
|
360
|
-
# Detected break at the end of a
|
379
|
+
# Detected break at the end of a
|
380
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
361
381
|
# @!attribute [rw] type
|
362
382
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak::Type]
|
363
383
|
# Detected break type.
|
@@ -382,14 +402,29 @@ module Google
|
|
382
402
|
end
|
383
403
|
end
|
384
404
|
|
405
|
+
# A detected symbol.
|
406
|
+
# @!attribute [rw] layout
|
407
|
+
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
408
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
409
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Symbol Symbol}.
|
410
|
+
# @!attribute [rw] detected_languages
|
411
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
412
|
+
# A list of detected languages together with confidence.
|
413
|
+
class Symbol
|
414
|
+
include ::Google::Protobuf::MessageExts
|
415
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
416
|
+
end
|
417
|
+
|
385
418
|
# Detected non-text visual elements e.g. checkbox, signature etc. on the
|
386
419
|
# page.
|
387
420
|
# @!attribute [rw] layout
|
388
421
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
389
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
422
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
423
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
390
424
|
# @!attribute [rw] type
|
391
425
|
# @return [::String]
|
392
|
-
# Type of the
|
426
|
+
# Type of the
|
427
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
393
428
|
# @!attribute [rw] detected_languages
|
394
429
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
395
430
|
# A list of detected languages together with confidence.
|
@@ -401,7 +436,8 @@ module Google
|
|
401
436
|
# A table representation similar to HTML table structure.
|
402
437
|
# @!attribute [rw] layout
|
403
438
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
404
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
439
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
440
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Table Table}.
|
405
441
|
# @!attribute [rw] header_rows
|
406
442
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableRow>]
|
407
443
|
# Header rows of the table.
|
@@ -427,7 +463,8 @@ module Google
|
|
427
463
|
# A cell representation inside the table.
|
428
464
|
# @!attribute [rw] layout
|
429
465
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
430
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
466
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
467
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableCell TableCell}.
|
431
468
|
# @!attribute [rw] row_span
|
432
469
|
# @return [::Integer]
|
433
470
|
# How many rows this cell spans.
|
@@ -446,11 +483,13 @@ module Google
|
|
446
483
|
# A form field detected on the page.
|
447
484
|
# @!attribute [rw] field_name
|
448
485
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
449
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
450
|
-
#
|
486
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
487
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} name.
|
488
|
+
# e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
|
451
489
|
# @!attribute [rw] field_value
|
452
490
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
453
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
491
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
492
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} value.
|
454
493
|
# @!attribute [rw] name_detected_languages
|
455
494
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
456
495
|
# A list of detected languages for name together with confidence.
|
@@ -477,7 +516,7 @@ module Google
|
|
477
516
|
# @return [::String]
|
478
517
|
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
479
518
|
# information, see
|
480
|
-
#
|
519
|
+
# https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
481
520
|
# @!attribute [rw] confidence
|
482
521
|
# @return [::Float]
|
483
522
|
# Confidence of detected language. Range [0, 1].
|
@@ -487,18 +526,21 @@ module Google
|
|
487
526
|
end
|
488
527
|
end
|
489
528
|
|
490
|
-
#
|
491
|
-
#
|
529
|
+
# An entity that could be a phrase in the text or a property that belongs to
|
530
|
+
# the document. It is a known entity type, such as a person, an organization,
|
531
|
+
# or location.
|
492
532
|
# @!attribute [rw] text_anchor
|
493
533
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
494
534
|
# Optional. Provenance of the entity.
|
495
|
-
# Text anchor indexing into the
|
535
|
+
# Text anchor indexing into the
|
536
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
496
537
|
# @!attribute [rw] type
|
497
538
|
# @return [::String]
|
498
539
|
# Entity type from a schema e.g. `Address`.
|
499
540
|
# @!attribute [rw] mention_text
|
500
541
|
# @return [::String]
|
501
|
-
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
542
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If
|
543
|
+
# the entity is not present in the document, this field will be empty.
|
502
544
|
# @!attribute [rw] mention_id
|
503
545
|
# @return [::String]
|
504
546
|
# Optional. Deprecated. Use `id` field instead.
|
@@ -507,28 +549,29 @@ module Google
|
|
507
549
|
# Optional. Confidence of detected Schema entity. Range [0, 1].
|
508
550
|
# @!attribute [rw] page_anchor
|
509
551
|
# @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor]
|
510
|
-
# Optional. Represents the provenance of this entity wrt. the location on
|
511
|
-
# page where it was found.
|
552
|
+
# Optional. Represents the provenance of this entity wrt. the location on
|
553
|
+
# the page where it was found.
|
512
554
|
# @!attribute [rw] id
|
513
555
|
# @return [::String]
|
514
556
|
# Optional. Canonical id. This will be a unique value in the entity list
|
515
557
|
# for this document.
|
516
558
|
# @!attribute [rw] normalized_value
|
517
559
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Entity::NormalizedValue]
|
518
|
-
# Optional. Normalized entity value. Absent if the extracted value could
|
519
|
-
# converted or the type (e.g. address) is not supported for certain
|
560
|
+
# Optional. Normalized entity value. Absent if the extracted value could
|
561
|
+
# not be converted or the type (e.g. address) is not supported for certain
|
520
562
|
# parsers. This field is also only populated for certain supported document
|
521
563
|
# types.
|
522
564
|
# @!attribute [rw] properties
|
523
565
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
|
524
|
-
# Optional. Entities can be nested to form a hierarchical data structure
|
525
|
-
# the content in the document.
|
566
|
+
# Optional. Entities can be nested to form a hierarchical data structure
|
567
|
+
# representing the content in the document.
|
526
568
|
# @!attribute [rw] provenance
|
527
569
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
|
528
570
|
# Optional. The history of this annotation.
|
529
571
|
# @!attribute [rw] redacted
|
530
572
|
# @return [::Boolean]
|
531
|
-
# Optional. Whether the entity will be redacted for de-identification
|
573
|
+
# Optional. Whether the entity will be redacted for de-identification
|
574
|
+
# purposes.
|
532
575
|
class Entity
|
533
576
|
include ::Google::Protobuf::MessageExts
|
534
577
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -556,10 +599,13 @@ module Google
|
|
556
599
|
# checkboxes.
|
557
600
|
# @!attribute [rw] text
|
558
601
|
# @return [::String]
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
602
|
+
# Optional. An optional field to store a normalized string.
|
603
|
+
# For some entity types, one of respective `structured_value` fields may
|
604
|
+
# also be populated. Also not all the types of `structured_value` will be
|
605
|
+
# normalized. For example, some processors may not generate float
|
606
|
+
# or int normalized text by default.
|
562
607
|
#
|
608
|
+
# Below are sample formats mapped to structured values.
|
563
609
|
# - Money/Currency type (`money_value`) is in the ISO 4217 text format.
|
564
610
|
# - Date type (`date_value`) is in the ISO 8601 text format.
|
565
611
|
# - Datetime type (`datetime_value`) is in the ISO 8601 text format.
|
@@ -569,7 +615,8 @@ module Google
|
|
569
615
|
end
|
570
616
|
end
|
571
617
|
|
572
|
-
# Relationship between
|
618
|
+
# Relationship between
|
619
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Entity Entities}.
|
573
620
|
# @!attribute [rw] subject_id
|
574
621
|
# @return [::String]
|
575
622
|
# Subject entity id.
|
@@ -584,27 +631,35 @@ module Google
|
|
584
631
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
585
632
|
end
|
586
633
|
|
587
|
-
# Text reference indexing into the
|
634
|
+
# Text reference indexing into the
|
635
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
588
636
|
# @!attribute [rw] text_segments
|
589
637
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment>]
|
590
|
-
# The text segments from the
|
638
|
+
# The text segments from the
|
639
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
591
640
|
# @!attribute [rw] content
|
592
641
|
# @return [::String]
|
593
642
|
# Contains the content of the text span so that users do
|
594
|
-
# not have to look it up in the text_segments.
|
643
|
+
# not have to look it up in the text_segments. It is always
|
644
|
+
# populated for formFields.
|
595
645
|
class TextAnchor
|
596
646
|
include ::Google::Protobuf::MessageExts
|
597
647
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
598
648
|
|
599
|
-
# A text segment in the
|
600
|
-
#
|
601
|
-
#
|
649
|
+
# A text segment in the
|
650
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. The indices
|
651
|
+
# may be out of bounds which indicate that the text extends into another
|
652
|
+
# document shard for large sharded documents. See
|
653
|
+
# {::Google::Cloud::DocumentAI::V1::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
602
654
|
# @!attribute [rw] start_index
|
603
655
|
# @return [::Integer]
|
604
|
-
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
656
|
+
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
657
|
+
# start UTF-8 char index in the
|
658
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
605
659
|
# @!attribute [rw] end_index
|
606
660
|
# @return [::Integer]
|
607
|
-
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
661
|
+
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
662
|
+
# half open end UTF-8 char index in the
|
608
663
|
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
609
664
|
class TextSegment
|
610
665
|
include ::Google::Protobuf::MessageExts
|
@@ -612,9 +667,10 @@ module Google
|
|
612
667
|
end
|
613
668
|
end
|
614
669
|
|
615
|
-
# Referencing the visual context of the entity in the
|
616
|
-
# Page anchors
|
617
|
-
#
|
670
|
+
# Referencing the visual context of the entity in the
|
671
|
+
# {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages}. Page anchors
|
672
|
+
# can be cross-page, consist of multiple bounding polygons and optionally
|
673
|
+
# reference specific layout element types.
|
618
674
|
# @!attribute [rw] page_refs
|
619
675
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef>]
|
620
676
|
# One or more references to visual page elements
|
@@ -625,22 +681,29 @@ module Google
|
|
625
681
|
# Represents a weak reference to a page element within a document.
|
626
682
|
# @!attribute [rw] page
|
627
683
|
# @return [::Integer]
|
628
|
-
# Required. Index into the
|
629
|
-
#
|
630
|
-
#
|
684
|
+
# Required. Index into the
|
685
|
+
# {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages} element,
|
686
|
+
# for example using [Document.pages][page_refs.page] to locate the
|
687
|
+
# related page element. This field is skipped when its value is the
|
688
|
+
# default 0. See
|
631
689
|
# https://developers.google.com/protocol-buffers/docs/proto3#json.
|
632
690
|
# @!attribute [rw] layout_type
|
633
691
|
# @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType]
|
634
|
-
# Optional. The type of the layout element that is being referenced if
|
692
|
+
# Optional. The type of the layout element that is being referenced if
|
693
|
+
# any.
|
635
694
|
# @!attribute [rw] layout_id
|
636
695
|
# @return [::String]
|
637
|
-
# Optional. Deprecated. Use
|
696
|
+
# Optional. Deprecated. Use
|
697
|
+
# {::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly}
|
698
|
+
# instead.
|
638
699
|
# @!attribute [rw] bounding_poly
|
639
700
|
# @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
|
640
|
-
# Optional. Identifies the bounding polygon of a layout element on the
|
701
|
+
# Optional. Identifies the bounding polygon of a layout element on the
|
702
|
+
# page.
|
641
703
|
# @!attribute [rw] confidence
|
642
704
|
# @return [::Float]
|
643
|
-
# Optional. Confidence of detected page element, if applicable. Range [0,
|
705
|
+
# Optional. Confidence of detected page element, if applicable. Range [0,
|
706
|
+
# 1].
|
644
707
|
class PageRef
|
645
708
|
include ::Google::Protobuf::MessageExts
|
646
709
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -650,25 +713,38 @@ module Google
|
|
650
713
|
# Layout Unspecified.
|
651
714
|
LAYOUT_TYPE_UNSPECIFIED = 0
|
652
715
|
|
653
|
-
# References a
|
716
|
+
# References a
|
717
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks}
|
718
|
+
# element.
|
654
719
|
BLOCK = 1
|
655
720
|
|
656
|
-
# References a
|
721
|
+
# References a
|
722
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs}
|
723
|
+
# element.
|
657
724
|
PARAGRAPH = 2
|
658
725
|
|
659
|
-
# References a
|
726
|
+
# References a
|
727
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
|
660
728
|
LINE = 3
|
661
729
|
|
662
|
-
# References a
|
730
|
+
# References a
|
731
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens}
|
732
|
+
# element.
|
663
733
|
TOKEN = 4
|
664
734
|
|
665
|
-
# References a
|
735
|
+
# References a
|
736
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#visual_elements Page.visual_elements}
|
737
|
+
# element.
|
666
738
|
VISUAL_ELEMENT = 5
|
667
739
|
|
668
|
-
# Refrrences a
|
740
|
+
# Refrrences a
|
741
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables}
|
742
|
+
# element.
|
669
743
|
TABLE = 6
|
670
744
|
|
671
|
-
# References a
|
745
|
+
# References a
|
746
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#form_fields Page.form_fields}
|
747
|
+
# element.
|
672
748
|
FORM_FIELD = 7
|
673
749
|
end
|
674
750
|
end
|
@@ -693,16 +769,15 @@ module Google
|
|
693
769
|
include ::Google::Protobuf::MessageExts
|
694
770
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
695
771
|
|
696
|
-
#
|
697
|
-
#
|
698
|
-
# are replaced.
|
772
|
+
# The parent element the current element is based on. Used for
|
773
|
+
# referencing/aligning, removal and replacement operations.
|
699
774
|
# @!attribute [rw] revision
|
700
775
|
# @return [::Integer]
|
701
|
-
# The index of the
|
776
|
+
# The index of the index into current revision's parent_ids list.
|
702
777
|
# @!attribute [rw] index
|
703
778
|
# @return [::Integer]
|
704
|
-
# The index of the parent
|
705
|
-
#
|
779
|
+
# The index of the parent item in the corresponding item list (eg. list
|
780
|
+
# of entities, properties within entities, etc.) in the parent revision.
|
706
781
|
# @!attribute [rw] id
|
707
782
|
# @return [::Integer]
|
708
783
|
# The id of the parent provenance.
|
@@ -713,19 +788,20 @@ module Google
|
|
713
788
|
|
714
789
|
# If a processor or agent does an explicit operation on existing elements.
|
715
790
|
module OperationType
|
716
|
-
# Operation type unspecified.
|
791
|
+
# Operation type unspecified. If no operation is specified a provenance
|
792
|
+
# entry is simply used to match against a `parent`.
|
717
793
|
OPERATION_TYPE_UNSPECIFIED = 0
|
718
794
|
|
719
|
-
# Add an element.
|
795
|
+
# Add an element.
|
720
796
|
ADD = 1
|
721
797
|
|
722
|
-
#
|
798
|
+
# Remove an element identified by `parent`.
|
723
799
|
REMOVE = 2
|
724
800
|
|
725
|
-
#
|
801
|
+
# Replace an element identified by `parent`.
|
726
802
|
REPLACE = 3
|
727
803
|
|
728
|
-
#
|
804
|
+
# Request human review for the element identified by `parent`.
|
729
805
|
EVAL_REQUESTED = 4
|
730
806
|
|
731
807
|
# Element is reviewed and approved at human review, confidence will be
|
@@ -782,8 +858,9 @@ module Google
|
|
782
858
|
# @!attribute [rw] text_anchor
|
783
859
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
784
860
|
# Provenance of the correction.
|
785
|
-
# Text anchor indexing into the
|
786
|
-
#
|
861
|
+
# Text anchor indexing into the
|
862
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. There can
|
863
|
+
# only be a single `TextAnchor.text_segments` element. If the start and
|
787
864
|
# end index of the text segment are the same, the text change is inserted
|
788
865
|
# before that index.
|
789
866
|
# @!attribute [rw] changed_text
|
@@ -227,6 +227,9 @@ module Google
|
|
227
227
|
# @!attribute [rw] common_metadata
|
228
228
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
229
229
|
# The basic metadata of the long running operation.
|
230
|
+
# @!attribute [rw] question_id
|
231
|
+
# @return [::String]
|
232
|
+
# The question ID.
|
230
233
|
class ReviewDocumentOperationMetadata
|
231
234
|
include ::Google::Protobuf::MessageExts
|
232
235
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-document_ai-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
- !ruby/object:Gem::Version
|
225
225
|
version: '0'
|
226
226
|
requirements: []
|
227
|
-
rubygems_version: 3.
|
227
|
+
rubygems_version: 3.3.5
|
228
228
|
signing_key:
|
229
229
|
specification_version: 4
|
230
230
|
summary: API Client library for the Document AI V1 API
|