google-cloud-document_ai-v1 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2e8db57e588d98c6ba1047d2f048c4ccebda06dee22637d1930cbbd0d245266
4
- data.tar.gz: db9b23b8d3599673cb6b99bdeb5424932f4e947db517c719ceedc3e0e8444b45
3
+ metadata.gz: db1b8b3e4a2a0e11379da959689aab8db44a9e531a7dab68763e71fba5cb4a8b
4
+ data.tar.gz: 4328522a4c2e5400b29affed08535e9dd13271113920ee8d9552a20a7cec2b5f
5
5
  SHA512:
6
- metadata.gz: 4b8aca2021deb1b9e978fe7d34b942ab8bacefc984e9d70e804749e8b1f0b111bcdf5bd5ab03454452b63aae848d8ba54baac5e2b26486ff26b6bb9da131f908
7
- data.tar.gz: 7e808c5d85b948080f05a77d99dc5746697542867a3584d8a399a814e2c65f57f0456509e8550e271bc425f233ebfcb56b5f92f5574ea06ebcefbf2eb997de24
6
+ metadata.gz: 14ac2abace39ad77e14fa79cd2621b1f62e89a313aca9cdfe8511591277bd078dd4680de95dac79c36c5157fda31fadde180c5f3eac51c74e0324633a04edebc
7
+ data.tar.gz: 3a7bc1163f4a53739ca45a393e57c975a1eb59858399104d51f02d21b41238fa2c1055938aef0a639fbc774fdb7f653137b0ae748a6754d91bc389a49cff2a71
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::DocumentAI::V1::ProcessRequest.new # (request fields
37
37
  response = client.process_document request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-document_ai-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/document-ai/)
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DocumentAI
23
23
  module V1
24
- VERSION = "0.2.4"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,6 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/document.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/api/field_behavior_pb'
5
6
  require 'google/cloud/documentai/v1/geometry_pb'
6
7
  require 'google/protobuf/timestamp_pb'
@@ -10,7 +11,6 @@ require 'google/type/date_pb'
10
11
  require 'google/type/datetime_pb'
11
12
  require 'google/type/money_pb'
12
13
  require 'google/type/postal_address_pb'
13
- require 'google/api/annotations_pb'
14
14
  require 'google/protobuf'
15
15
 
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -63,6 +63,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
63
63
  repeated :visual_elements, :message, 9, "google.cloud.documentai.v1.Document.Page.VisualElement"
64
64
  repeated :tables, :message, 10, "google.cloud.documentai.v1.Document.Page.Table"
65
65
  repeated :form_fields, :message, 11, "google.cloud.documentai.v1.Document.Page.FormField"
66
+ repeated :symbols, :message, 12, "google.cloud.documentai.v1.Document.Page.Symbol"
66
67
  optional :provenance, :message, 16, "google.cloud.documentai.v1.Document.Provenance"
67
68
  end
68
69
  add_message "google.cloud.documentai.v1.Document.Page.Dimension" do
@@ -125,6 +126,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
125
126
  value :WIDE_SPACE, 2
126
127
  value :HYPHEN, 3
127
128
  end
129
+ add_message "google.cloud.documentai.v1.Document.Page.Symbol" do
130
+ optional :layout, :message, 1, "google.cloud.documentai.v1.Document.Page.Layout"
131
+ repeated :detected_languages, :message, 2, "google.cloud.documentai.v1.Document.Page.DetectedLanguage"
132
+ end
128
133
  add_message "google.cloud.documentai.v1.Document.Page.VisualElement" do
129
134
  optional :layout, :message, 1, "google.cloud.documentai.v1.Document.Page.Layout"
130
135
  optional :type, :string, 2
@@ -275,6 +280,7 @@ module Google
275
280
  Document::Page::Token = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token").msgclass
276
281
  Document::Page::Token::DetectedBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token.DetectedBreak").msgclass
277
282
  Document::Page::Token::DetectedBreak::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type").enummodule
283
+ Document::Page::Symbol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Symbol").msgclass
278
284
  Document::Page::VisualElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.VisualElement").msgclass
279
285
  Document::Page::Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Table").msgclass
280
286
  Document::Page::Table::TableRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Table.TableRow").msgclass
@@ -87,6 +87,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
87
87
  end
88
88
  add_message "google.cloud.documentai.v1.ReviewDocumentOperationMetadata" do
89
89
  optional :common_metadata, :message, 5, "google.cloud.documentai.v1.CommonOperationMetadata"
90
+ optional :question_id, :string, 6
90
91
  end
91
92
  end
92
93
  end
@@ -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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. For document shards,
58
- # entities in this list may cross shard boundaries.
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 {::Google::Cloud::DocumentAI::V1::Document#entities Document.entities}.
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text} in the overall
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page Page} in a parent {::Google::Cloud::DocumentAI::V1::Document Document}.
147
- # Useful when a page is taken out of a {::Google::Cloud::DocumentAI::V1::Document Document} for individual
148
- # processing.
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} within context of the object this
262
- # layout is for. e.g. confidence can be for a single token, a table,
263
- # a visual element, etc. depending on context. Range [0, 1].
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Block Block}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Paragraph Paragraph}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Line Line}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Table Table}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableCell TableCell}.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} name. e.g. `Address`, `Email`,
450
- # `Grand total`, `Phone number`, etc.
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 {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} value.
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
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
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
- # A phrase in the text that is a known entity type, such as a person, an
491
- # organization, or location.
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
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 the
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 not be
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 representing
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 purposes.
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
- # Required. Normalized entity value stored as a string. This field is populated for
560
- # supported document type (e.g. Invoice). For some entity types, one of
561
- # respective 'structured_value' fields may also be populated.
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 {::Google::Cloud::DocumentAI::V1::Document::Entity Entities}.
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. The indices may be out of bounds
600
- # which indicate that the text extends into another document shard for
601
- # large sharded documents. See {::Google::Cloud::DocumentAI::V1::Document::ShardInfo#text_offset ShardInfo.text_offset}
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} start UTF-8 char index in the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
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} half open end UTF-8 char index in the
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 {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages}.
616
- # Page anchors can be cross-page, consist of multiple bounding polygons and
617
- # optionally reference specific layout element types.
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 {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages} element, for example using
629
- # [Document.pages][page_refs.page] to locate the related page element.
630
- # This field is skipped when its value is the default 0. See
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 any.
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 {::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} instead.
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 page.
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, 1].
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 {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks} element.
716
+ # References a
717
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks}
718
+ # element.
654
719
  BLOCK = 1
655
720
 
656
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs} element.
721
+ # References a
722
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs}
723
+ # element.
657
724
  PARAGRAPH = 2
658
725
 
659
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
726
+ # References a
727
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
660
728
  LINE = 3
661
729
 
662
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens} element.
730
+ # References a
731
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens}
732
+ # element.
663
733
  TOKEN = 4
664
734
 
665
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#visual_elements Page.visual_elements} element.
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 {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables} element.
740
+ # Refrrences a
741
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables}
742
+ # element.
669
743
  TABLE = 6
670
744
 
671
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#form_fields Page.form_fields} element.
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
- # Structure for referencing parent provenances. When an element replaces
697
- # one of more other elements parent references identify the elements that
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 [Document.revisions] identifying the parent revision.
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 revisions corresponding collection of items
705
- # (eg. list of entities, properties within entities, etc.)
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. Implicit if no `parents` are set for the provenance.
795
+ # Add an element.
720
796
  ADD = 1
721
797
 
722
- # The element is removed. No `parents` should be set.
798
+ # Remove an element identified by `parent`.
723
799
  REMOVE = 2
724
800
 
725
- # Explicitly replaces the element(s) identified by `parents`.
801
+ # Replace an element identified by `parent`.
726
802
  REPLACE = 3
727
803
 
728
- # Element is requested for human review.
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 {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. There can only be a
786
- # single `TextAnchor.text_segments` element. If the start and
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.2.4
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: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2022-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -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.3.4
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