google-cloud-document_ai-v1beta3 0.13.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.
@@ -60,9 +60,9 @@ module Google
60
60
  # Placeholder. Relationship among {::Google::Cloud::DocumentAI::V1beta3::Document#entities Document.entities}.
61
61
  # @!attribute [rw] text_changes
62
62
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>]
63
- # Placeholder. A list of text corrections made to [Document.text]. This is
64
- # usually used for annotating corrections to OCR mistakes. Text changes for
65
- # 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.
66
66
  # @!attribute [rw] shard_info
67
67
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo]
68
68
  # Information about the sharding if this document is sharded part of a larger
@@ -122,6 +122,10 @@ module Google
122
122
  # @!attribute [rw] font_size
123
123
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize]
124
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
125
129
  class Style
126
130
  include ::Google::Protobuf::MessageExts
127
131
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -195,6 +199,9 @@ module Google
195
199
  # @!attribute [rw] detected_barcodes
196
200
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>]
197
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.
198
205
  # @!attribute [rw] provenance
199
206
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
200
207
  # The history of this page.
@@ -265,7 +272,7 @@ module Google
265
272
  # @return [::Float]
266
273
  # Confidence of the current {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within context of the object this
267
274
  # layout is for. e.g. confidence can be for a single token, a table,
268
- # a visual element, etc. depending on context. Range [0, 1].
275
+ # a visual element, etc. depending on context. Range `[0, 1]`.
269
276
  # @!attribute [rw] bounding_poly
270
277
  # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
271
278
  # The bounding polygon for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
@@ -357,7 +364,7 @@ module Google
357
364
  # A list of detected languages together with confidence.
358
365
  # @!attribute [rw] provenance
359
366
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
360
- # The history of this annotation.
367
+ # The history of this annotation.
361
368
  class Token
362
369
  include ::Google::Protobuf::MessageExts
363
370
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -428,6 +435,9 @@ module Google
428
435
  # @!attribute [rw] detected_languages
429
436
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
430
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.
431
441
  class Table
432
442
  include ::Google::Protobuf::MessageExts
433
443
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -514,16 +524,50 @@ module Google
514
524
  # Detected language for a structural component.
515
525
  # @!attribute [rw] language_code
516
526
  # @return [::String]
517
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
527
+ # The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
518
528
  # information, see
519
529
  # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
520
530
  # @!attribute [rw] confidence
521
531
  # @return [::Float]
522
- # Confidence of detected language. Range [0, 1].
532
+ # Confidence of detected language. Range `[0, 1]`.
523
533
  class DetectedLanguage
524
534
  include ::Google::Protobuf::MessageExts
525
535
  extend ::Google::Protobuf::MessageExts::ClassMethods
526
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
527
571
  end
528
572
 
529
573
  # An entity that could be a phrase in the text or a property that belongs to
@@ -538,14 +582,13 @@ module Google
538
582
  # Required. Entity type from a schema e.g. `Address`.
539
583
  # @!attribute [rw] mention_text
540
584
  # @return [::String]
541
- # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity
542
- # is not present in the document, this field will be empty.
585
+ # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
543
586
  # @!attribute [rw] mention_id
544
587
  # @return [::String]
545
588
  # Optional. Deprecated. Use `id` field instead.
546
589
  # @!attribute [rw] confidence
547
590
  # @return [::Float]
548
- # Optional. Confidence of detected Schema entity. Range [0, 1].
591
+ # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
549
592
  # @!attribute [rw] page_anchor
550
593
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor]
551
594
  # Optional. Represents the provenance of this entity wrt. the location on the
@@ -610,6 +653,7 @@ module Google
610
653
  # or int normalized text by default.
611
654
  #
612
655
  # Below are sample formats mapped to structured values.
656
+ #
613
657
  # - Money/Currency type (`money_value`) is in the ISO 4217 text format.
614
658
  # - Date type (`date_value`) is in the ISO 8601 text format.
615
659
  # - Datetime type (`datetime_value`) is in the ISO 8601 text format.
@@ -691,7 +735,7 @@ module Google
691
735
  # Optional. Identifies the bounding polygon of a layout element on the page.
692
736
  # @!attribute [rw] confidence
693
737
  # @return [::Float]
694
- # Optional. Confidence of detected page element, if applicable. Range [0, 1].
738
+ # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
695
739
  class PageRef
696
740
  include ::Google::Protobuf::MessageExts
697
741
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -28,7 +28,7 @@ module Google
28
28
  # @!attribute [rw] mime_type
29
29
  # @return [::String]
30
30
  # An IANA MIME type (RFC6838) indicating the nature and format of the
31
- # [content].
31
+ # {::Google::Cloud::DocumentAI::V1beta3::RawDocument#content content}.
32
32
  class RawDocument
33
33
  include ::Google::Protobuf::MessageExts
34
34
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -67,7 +67,7 @@ module Google
67
67
  # The common config to specify a set of documents used as input.
68
68
  # @!attribute [rw] gcs_prefix
69
69
  # @return [::Google::Cloud::DocumentAI::V1beta3::GcsPrefix]
70
- # The set of documents that match the specified Cloud Storage [gcs_prefix].
70
+ # The set of documents that match the specified Cloud Storage `gcs_prefix`.
71
71
  # @!attribute [rw] gcs_documents
72
72
  # @return [::Google::Cloud::DocumentAI::V1beta3::GcsDocuments]
73
73
  # The set of documents individually specified on Cloud Storage.
@@ -89,6 +89,11 @@ module Google
89
89
  # @!attribute [rw] gcs_uri
90
90
  # @return [::String]
91
91
  # The Cloud Storage uri (a directory) of the output.
92
+ # @!attribute [rw] field_mask
93
+ # @return [::Google::Protobuf::FieldMask]
94
+ # Specifies which fields to include in the output documents.
95
+ # Only supports top level document and pages field so it must be in the
96
+ # form of `{document_field_name}` or `pages.{page_field_name}`.
92
97
  class GcsOutputConfig
93
98
  include ::Google::Protobuf::MessageExts
94
99
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -46,6 +46,8 @@ module Google
46
46
  # @!attribute [rw] field_mask
47
47
  # @return [::Google::Protobuf::FieldMask]
48
48
  # Specifies which fields to include in ProcessResponse's document.
49
+ # Only supports top level document and pages field so it must be in the form
50
+ # of `{document_field_name}` or `pages.{page_field_name}`.
49
51
  class ProcessRequest
50
52
  include ::Google::Protobuf::MessageExts
51
53
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -553,6 +555,89 @@ module Google
553
555
  extend ::Google::Protobuf::MessageExts::ClassMethods
554
556
  end
555
557
 
558
+ # Request message for the create processor version method.
559
+ # @!attribute [rw] parent
560
+ # @return [::String]
561
+ # Required. The parent (project, location and processor) to create the new version for.
562
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`.
563
+ # @!attribute [rw] processor_version
564
+ # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion]
565
+ # Required. The processor version to be created.
566
+ # @!attribute [rw] document_schema
567
+ # @return [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema]
568
+ # Optional. The schema the processor version will be trained with.
569
+ # @!attribute [rw] input_data
570
+ # @return [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::InputData]
571
+ # Optional. The input data used to train the `ProcessorVersion`.
572
+ # @!attribute [rw] base_processor_version
573
+ # @return [::String]
574
+ # Optional. The processor version to use as a base for training. This processor version
575
+ # must be a child of `parent`. Format:
576
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
577
+ class TrainProcessorVersionRequest
578
+ include ::Google::Protobuf::MessageExts
579
+ extend ::Google::Protobuf::MessageExts::ClassMethods
580
+
581
+ # The input data used to train a new `ProcessorVersion`.
582
+ # @!attribute [rw] training_documents
583
+ # @return [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig]
584
+ # The documents used for training the new version.
585
+ # @!attribute [rw] test_documents
586
+ # @return [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig]
587
+ # The documents used for testing the trained version.
588
+ class InputData
589
+ include ::Google::Protobuf::MessageExts
590
+ extend ::Google::Protobuf::MessageExts::ClassMethods
591
+ end
592
+ end
593
+
594
+ # The response for the TrainProcessorVersion method.
595
+ # @!attribute [rw] processor_version
596
+ # @return [::String]
597
+ # The resource name of the processor version produced by training.
598
+ class TrainProcessorVersionResponse
599
+ include ::Google::Protobuf::MessageExts
600
+ extend ::Google::Protobuf::MessageExts::ClassMethods
601
+ end
602
+
603
+ # The metadata that represents a processor version being created.
604
+ # @!attribute [rw] common_metadata
605
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
606
+ # The basic metadata of the long running operation.
607
+ # @!attribute [rw] training_dataset_validation
608
+ # @return [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionMetadata::DatasetValidation]
609
+ # The training dataset validation information.
610
+ # @!attribute [rw] test_dataset_validation
611
+ # @return [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionMetadata::DatasetValidation]
612
+ # The test dataset validation information.
613
+ class TrainProcessorVersionMetadata
614
+ include ::Google::Protobuf::MessageExts
615
+ extend ::Google::Protobuf::MessageExts::ClassMethods
616
+
617
+ # The dataset validation information.
618
+ # This includes any and all errors with documents and the dataset.
619
+ # @!attribute [rw] document_error_count
620
+ # @return [::Integer]
621
+ # The total number of document errors.
622
+ # @!attribute [rw] dataset_error_count
623
+ # @return [::Integer]
624
+ # The total number of dataset errors.
625
+ # @!attribute [rw] document_errors
626
+ # @return [::Array<::Google::Rpc::Status>]
627
+ # Error information pertaining to specific documents. A maximum of 10
628
+ # document errors will be returned.
629
+ # Any document with errors will not be used throughout training.
630
+ # @!attribute [rw] dataset_errors
631
+ # @return [::Array<::Google::Rpc::Status>]
632
+ # Error information for the dataset as a whole. A maximum of 10 dataset
633
+ # errors will be returned.
634
+ # A single dataset error is terminal for training.
635
+ class DatasetValidation
636
+ include ::Google::Protobuf::MessageExts
637
+ extend ::Google::Protobuf::MessageExts::ClassMethods
638
+ end
639
+ end
640
+
556
641
  # Request message for review document method.
557
642
  # @!attribute [rw] inline_document
558
643
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
@@ -661,6 +746,80 @@ module Google
661
746
  CANCELLED = 5
662
747
  end
663
748
  end
749
+
750
+ # Evaluates the given ProcessorVersion against the supplied documents.
751
+ # @!attribute [rw] processor_version
752
+ # @return [::String]
753
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to evaluate.
754
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
755
+ # @!attribute [rw] evaluation_documents
756
+ # @return [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig]
757
+ # Optional. The documents used in the evaluation. If unspecified, use the processor's
758
+ # dataset as evaluation input.
759
+ class EvaluateProcessorVersionRequest
760
+ include ::Google::Protobuf::MessageExts
761
+ extend ::Google::Protobuf::MessageExts::ClassMethods
762
+ end
763
+
764
+ # Metadata of the EvaluateProcessorVersion method.
765
+ # @!attribute [rw] common_metadata
766
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
767
+ # The basic metadata of the long running operation.
768
+ class EvaluateProcessorVersionMetadata
769
+ include ::Google::Protobuf::MessageExts
770
+ extend ::Google::Protobuf::MessageExts::ClassMethods
771
+ end
772
+
773
+ # Metadata of the EvaluateProcessorVersion method.
774
+ # @!attribute [rw] evaluation
775
+ # @return [::String]
776
+ # The resource name of the created evaluation.
777
+ class EvaluateProcessorVersionResponse
778
+ include ::Google::Protobuf::MessageExts
779
+ extend ::Google::Protobuf::MessageExts::ClassMethods
780
+ end
781
+
782
+ # Retrieves a specific Evaluation.
783
+ # @!attribute [rw] name
784
+ # @return [::String]
785
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::Evaluation Evaluation} to get.
786
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
787
+ class GetEvaluationRequest
788
+ include ::Google::Protobuf::MessageExts
789
+ extend ::Google::Protobuf::MessageExts::ClassMethods
790
+ end
791
+
792
+ # Retrieves a list of evaluations for a given ProcessorVersion.
793
+ # @!attribute [rw] parent
794
+ # @return [::String]
795
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to list evaluations for.
796
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
797
+ # @!attribute [rw] page_size
798
+ # @return [::Integer]
799
+ # The standard list page size.
800
+ # If unspecified, at most 5 evaluations will be returned.
801
+ # The maximum value is 100; values above 100 will be coerced to 100.
802
+ # @!attribute [rw] page_token
803
+ # @return [::String]
804
+ # A page token, received from a previous `ListEvaluations` call.
805
+ # Provide this to retrieve the subsequent page.
806
+ class ListEvaluationsRequest
807
+ include ::Google::Protobuf::MessageExts
808
+ extend ::Google::Protobuf::MessageExts::ClassMethods
809
+ end
810
+
811
+ # The response from ListEvaluations.
812
+ # @!attribute [rw] evaluations
813
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Evaluation>]
814
+ # The evaluations requested.
815
+ # @!attribute [rw] next_page_token
816
+ # @return [::String]
817
+ # A token, which can be sent as `page_token` to retrieve the next page.
818
+ # If this field is omitted, there are no subsequent pages.
819
+ class ListEvaluationsResponse
820
+ include ::Google::Protobuf::MessageExts
821
+ extend ::Google::Protobuf::MessageExts::ClassMethods
822
+ end
664
823
  end
665
824
  end
666
825
  end
@@ -56,15 +56,16 @@ module Google
56
56
  # Name of the type. It must be unique within the schema file and
57
57
  # cannot be a 'Common Type'. Besides that we use the following naming
58
58
  # conventions:
59
- # - *use snake_casing*
59
+ #
60
+ # - *use `snake_casing`*
60
61
  # - name matching is case-insensitive
61
62
  # - Maximum 64 characters.
62
63
  # - Must start with a letter.
63
64
  # - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward
64
65
  # compatibility internal infrastructure and tooling can handle any ascii
65
66
  # character)
66
- # - The '/' is sometimes used to denote a property of a type. For example
67
- # line_item/amount. This convention is deprecated, but will still be
67
+ # - The `/` is sometimes used to denote a property of a type. For example
68
+ # `line_item/amount`. This convention is deprecated, but will still be
68
69
  # honored for backward compatibility.
69
70
  # @!attribute [rw] base_types
70
71
  # @return [::Array<::String>]
@@ -0,0 +1,181 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module DocumentAI
23
+ module V1beta3
24
+ # An evaluation of a ProcessorVersion's performance.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # The resource name of the evaluation.
28
+ # Format:
29
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
30
+ # @!attribute [rw] create_time
31
+ # @return [::Google::Protobuf::Timestamp]
32
+ # The time that the evaluation was created.
33
+ # @!attribute [rw] document_counters
34
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Evaluation::Counters]
35
+ # Counters for the documents used in the evaluation.
36
+ # @!attribute [rw] all_entities_metrics
37
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Evaluation::MultiConfidenceMetrics]
38
+ # Metrics for all the entities in aggregate.
39
+ # @!attribute [rw] entity_metrics
40
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DocumentAI::V1beta3::Evaluation::MultiConfidenceMetrics}]
41
+ # Metrics across confidence levels, for different entities.
42
+ # @!attribute [rw] kms_key_name
43
+ # @return [::String]
44
+ # The KMS key name used for encryption.
45
+ # @!attribute [rw] kms_key_version_name
46
+ # @return [::String]
47
+ # The KMS key version with which data is encrypted.
48
+ class Evaluation
49
+ include ::Google::Protobuf::MessageExts
50
+ extend ::Google::Protobuf::MessageExts::ClassMethods
51
+
52
+ # Evaluation counters for the documents that were used.
53
+ # @!attribute [rw] input_documents_count
54
+ # @return [::Integer]
55
+ # How many documents were sent for evaluation.
56
+ # @!attribute [rw] invalid_documents_count
57
+ # @return [::Integer]
58
+ # How many documents were not included in the evaluation as they didn't
59
+ # pass validation.
60
+ # @!attribute [rw] failed_documents_count
61
+ # @return [::Integer]
62
+ # How many documents were not included in the evaluation as Document AI
63
+ # failed to process them.
64
+ # @!attribute [rw] evaluated_documents_count
65
+ # @return [::Integer]
66
+ # How many documents were used in the evaluation.
67
+ class Counters
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # Evaluation metrics, either in aggregate or about a specific entity.
73
+ # @!attribute [rw] precision
74
+ # @return [::Float]
75
+ # The calculated precision.
76
+ # @!attribute [rw] recall
77
+ # @return [::Float]
78
+ # The calculated recall.
79
+ # @!attribute [rw] f1_score
80
+ # @return [::Float]
81
+ # The calculated f1 score.
82
+ # @!attribute [rw] predicted_occurrences_count
83
+ # @return [::Integer]
84
+ # The amount of occurrences in predicted documents.
85
+ # @!attribute [rw] ground_truth_occurrences_count
86
+ # @return [::Integer]
87
+ # The amount of occurrences in ground truth documents.
88
+ # @!attribute [rw] predicted_document_count
89
+ # @return [::Integer]
90
+ # The amount of documents with a predicted occurrence.
91
+ # @!attribute [rw] ground_truth_document_count
92
+ # @return [::Integer]
93
+ # The amount of documents with a ground truth occurrence.
94
+ # @!attribute [rw] true_positives_count
95
+ # @return [::Integer]
96
+ # The amount of true positives.
97
+ # @!attribute [rw] false_positives_count
98
+ # @return [::Integer]
99
+ # The amount of false positives.
100
+ # @!attribute [rw] false_negatives_count
101
+ # @return [::Integer]
102
+ # The amount of false negatives.
103
+ # @!attribute [rw] total_documents_count
104
+ # @return [::Integer]
105
+ # The amount of documents that had an occurrence of this label.
106
+ class Metrics
107
+ include ::Google::Protobuf::MessageExts
108
+ extend ::Google::Protobuf::MessageExts::ClassMethods
109
+ end
110
+
111
+ # Evaluations metrics, at a specific confidence level.
112
+ # @!attribute [rw] confidence_level
113
+ # @return [::Float]
114
+ # The confidence level.
115
+ # @!attribute [rw] metrics
116
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Evaluation::Metrics]
117
+ # The metrics at the specific confidence level.
118
+ class ConfidenceLevelMetrics
119
+ include ::Google::Protobuf::MessageExts
120
+ extend ::Google::Protobuf::MessageExts::ClassMethods
121
+ end
122
+
123
+ # Metrics across multiple confidence levels.
124
+ # @!attribute [rw] confidence_level_metrics
125
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Evaluation::ConfidenceLevelMetrics>]
126
+ # Metrics across confidence levels with fuzzy matching enabled.
127
+ # @!attribute [rw] confidence_level_metrics_exact
128
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Evaluation::ConfidenceLevelMetrics>]
129
+ # Metrics across confidence levels with only exact matching.
130
+ # @!attribute [rw] auprc
131
+ # @return [::Float]
132
+ # The calculated area under the precision recall curve (AUPRC), computed by
133
+ # integrating over all confidence thresholds.
134
+ # @!attribute [rw] estimated_calibration_error
135
+ # @return [::Float]
136
+ # The Estimated Calibration Error (ECE) of the confidence of the predicted
137
+ # entities.
138
+ # @!attribute [rw] auprc_exact
139
+ # @return [::Float]
140
+ # The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
141
+ # only.
142
+ # @!attribute [rw] estimated_calibration_error_exact
143
+ # @return [::Float]
144
+ # The ECE for the predicted entities with fuzzy matching disabled, i.e.,
145
+ # exact matching only.
146
+ # @!attribute [rw] metrics_type
147
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Evaluation::MultiConfidenceMetrics::MetricsType]
148
+ # The metrics type for the label.
149
+ class MultiConfidenceMetrics
150
+ include ::Google::Protobuf::MessageExts
151
+ extend ::Google::Protobuf::MessageExts::ClassMethods
152
+
153
+ # A type that determines how metrics should be interpreted.
154
+ module MetricsType
155
+ # The metrics type is unspecified. By default, metrics without a
156
+ # particular specification are for leaf entity types (i.e., top-level
157
+ # entity types without child types, or child types which are not
158
+ # parent types themselves).
159
+ METRICS_TYPE_UNSPECIFIED = 0
160
+
161
+ # Indicates whether metrics for this particular label type represent an
162
+ # aggregate of metrics for other types instead of being based on actual
163
+ # TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf)
164
+ # entity types are an aggregate of metrics for their children.
165
+ AGGREGATE = 1
166
+ end
167
+ end
168
+
169
+ # @!attribute [rw] key
170
+ # @return [::String]
171
+ # @!attribute [rw] value
172
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Evaluation::MultiConfidenceMetrics]
173
+ class EntityMetricsEntry
174
+ include ::Google::Protobuf::MessageExts
175
+ extend ::Google::Protobuf::MessageExts::ClassMethods
176
+ end
177
+ end
178
+ end
179
+ end
180
+ end
181
+ end
@@ -34,6 +34,9 @@ module Google
34
34
  # @!attribute [rw] display_name
35
35
  # @return [::String]
36
36
  # The display name of the processor version.
37
+ # @!attribute [rw] document_schema
38
+ # @return [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema]
39
+ # The schema of the processor version. Describes the output.
37
40
  # @!attribute [rw] state
38
41
  # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion::State]
39
42
  # The state of the processor version.
@@ -104,7 +107,7 @@ module Google
104
107
  # Format: `projects/{project}/locations/{location}/processors/{processor}`
105
108
  # @!attribute [rw] type
106
109
  # @return [::String]
107
- # The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
110
+ # The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
108
111
  # To get a list of processors types, see
109
112
  # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#fetch_processor_types FetchProcessorTypes}.
110
113
  # @!attribute [rw] display_name
@@ -143,14 +146,14 @@ module Google
143
146
  # The processor is disabled.
144
147
  DISABLED = 2
145
148
 
146
- # The processor is being enabled, will become ENABLED if successful.
149
+ # The processor is being enabled, will become `ENABLED` if successful.
147
150
  ENABLING = 3
148
151
 
149
- # The processor is being disabled, will become DISABLED if successful.
152
+ # The processor is being disabled, will become `DISABLED` if successful.
150
153
  DISABLING = 4
151
154
 
152
- # The processor is being created, will become either ENABLED (for
153
- # successful creation) or FAILED (for failed ones).
155
+ # The processor is being created, will become either `ENABLED` (for
156
+ # successful creation) or `FAILED` (for failed ones).
154
157
  # Once a processor is in this state, it can then be used for document
155
158
  # processing, but the feature dependencies of the processor might not be
156
159
  # fully created yet.
@@ -26,10 +26,10 @@ module Google
26
26
  # @!attribute [rw] name
27
27
  # @return [::String]
28
28
  # The resource name of the processor type.
29
- # Format: projects/\\{project}/processorTypes/\\{processor_type}
29
+ # Format: `projects/{project}/processorTypes/{processor_type}`
30
30
  # @!attribute [rw] type
31
31
  # @return [::String]
32
- # The type of the processor, e.g., "invoice_parsing".
32
+ # The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
33
33
  # @!attribute [rw] category
34
34
  # @return [::String]
35
35
  # The processor category, used by UI to group processor types.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-document_ai-v1beta3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.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-08-17 00:00:00.000000000 Z
11
+ date: 2022-11-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.10'
19
+ version: '0.12'
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.10'
29
+ version: '0.12'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -204,11 +204,13 @@ files:
204
204
  - lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb
205
205
  - lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb
206
206
  - lib/google/cloud/documentai/v1beta3/document_schema_pb.rb
207
+ - lib/google/cloud/documentai/v1beta3/evaluation_pb.rb
207
208
  - lib/google/cloud/documentai/v1beta3/geometry_pb.rb
208
209
  - lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb
209
210
  - lib/google/cloud/documentai/v1beta3/processor_pb.rb
210
211
  - lib/google/cloud/documentai/v1beta3/processor_type_pb.rb
211
212
  - proto_docs/README.md
213
+ - proto_docs/google/api/client.rb
212
214
  - proto_docs/google/api/field_behavior.rb
213
215
  - proto_docs/google/api/launch_stage.rb
214
216
  - proto_docs/google/api/resource.rb
@@ -217,6 +219,7 @@ files:
217
219
  - proto_docs/google/cloud/documentai/v1beta3/document_io.rb
218
220
  - proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb
219
221
  - proto_docs/google/cloud/documentai/v1beta3/document_schema.rb
222
+ - proto_docs/google/cloud/documentai/v1beta3/evaluation.rb
220
223
  - proto_docs/google/cloud/documentai/v1beta3/geometry.rb
221
224
  - proto_docs/google/cloud/documentai/v1beta3/operation_metadata.rb
222
225
  - proto_docs/google/cloud/documentai/v1beta3/processor.rb