google-cloud-document_ai-v1beta3 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +53 -31
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +4 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +6 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +4 -2
- data/lib/google/cloud/documentai/v1beta3/processor_type_pb.rb +1 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document.rb +145 -79
- data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +10 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +59 -27
- data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +1 -1
- data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +2 -1
- data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d55d2c1ce5d3ed5e10eadba70b9918fe8d1d2c61dcfa1d5a9c53ddab3afb2251
|
4
|
+
data.tar.gz: 1aa35b4f5f1bfe71be8caf00a5aa1620158d9165a287e2bd948d382d7337707a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4845fd22a6313384d55bf5d548f013386c5f2d68fb8b456c5c099a115354df2314b42f2d72d821d7ac925ad9c80628971e6570317cae861d4cd1b1bccade468
|
7
|
+
data.tar.gz: a70ca965cbe0fe5368d05b0c6db4088ef758127eec995842d339ac06694aa5132ed705a95535b1b9244e36f985165b082381c0ae1b0d9fcc45eb9295d5581ebe
|
@@ -202,7 +202,7 @@ module Google
|
|
202
202
|
# @param options [::Gapic::CallOptions, ::Hash]
|
203
203
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
204
204
|
#
|
205
|
-
# @overload process_document(inline_document: nil, raw_document: nil, name: nil, document: nil, skip_human_review: nil, field_mask: nil)
|
205
|
+
# @overload process_document(inline_document: nil, raw_document: nil, name: nil, document: nil, skip_human_review: nil, field_mask: nil, process_options: nil)
|
206
206
|
# Pass arguments to `process_document` via keyword arguments. Note that at
|
207
207
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
208
208
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -212,11 +212,15 @@ module Google
|
|
212
212
|
# @param raw_document [::Google::Cloud::DocumentAI::V1beta3::RawDocument, ::Hash]
|
213
213
|
# A raw document content (bytes).
|
214
214
|
# @param name [::String]
|
215
|
-
# Required. The resource name of the
|
215
|
+
# Required. The resource name of the
|
216
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
|
216
217
|
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}
|
217
|
-
# to use for processing. If a
|
218
|
-
#
|
219
|
-
#
|
218
|
+
# to use for processing. If a
|
219
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} is specified, the
|
220
|
+
# server will use its [default
|
221
|
+
# version][google.cloud.documentai.v1beta3.Processor.default_processor_version].
|
222
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
223
|
+
# or
|
220
224
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
221
225
|
# @param document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
|
222
226
|
# The document payload, the [content] and [mime_type] fields must be set.
|
@@ -227,6 +231,8 @@ module Google
|
|
227
231
|
# Specifies which fields to include in ProcessResponse's document.
|
228
232
|
# Only supports top level document and pages field so it must be in the form
|
229
233
|
# of `{document_field_name}` or `pages.{page_field_name}`.
|
234
|
+
# @param process_options [::Google::Cloud::DocumentAI::V1beta3::ProcessOptions, ::Hash]
|
235
|
+
# Inference-time options for the process API
|
230
236
|
#
|
231
237
|
# @yield [response, operation] Access the result along with the RPC operation
|
232
238
|
# @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::ProcessResponse]
|
@@ -306,13 +312,14 @@ module Google
|
|
306
312
|
# @param options [::Gapic::CallOptions, ::Hash]
|
307
313
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
308
314
|
#
|
309
|
-
# @overload batch_process_documents(name: nil, input_configs: nil, output_config: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil)
|
315
|
+
# @overload batch_process_documents(name: nil, input_configs: nil, output_config: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil, process_options: nil)
|
310
316
|
# Pass arguments to `batch_process_documents` via keyword arguments. Note that at
|
311
317
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
312
318
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
313
319
|
#
|
314
320
|
# @param name [::String]
|
315
|
-
# Required. The resource name of
|
321
|
+
# Required. The resource name of
|
322
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
|
316
323
|
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
|
317
324
|
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
318
325
|
# or
|
@@ -328,6 +335,8 @@ module Google
|
|
328
335
|
# @param skip_human_review [::Boolean]
|
329
336
|
# Whether Human Review feature should be skipped for this request. Default to
|
330
337
|
# false.
|
338
|
+
# @param process_options [::Google::Cloud::DocumentAI::V1beta3::ProcessOptions, ::Hash]
|
339
|
+
# Inference-time options for the process API
|
331
340
|
#
|
332
341
|
# @yield [response, operation] Access the result along with the RPC operation
|
333
342
|
# @yieldparam response [::Gapic::Operation]
|
@@ -608,8 +617,8 @@ module Google
|
|
608
617
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
609
618
|
#
|
610
619
|
# @param parent [::String]
|
611
|
-
# Required. The parent (project and location) which owns this collection of
|
612
|
-
# Format: `projects/{project}/locations/{location}`
|
620
|
+
# Required. The parent (project and location) which owns this collection of
|
621
|
+
# Processors. Format: `projects/{project}/locations/{location}`
|
613
622
|
# @param page_size [::Integer]
|
614
623
|
# The maximum number of processors to return.
|
615
624
|
# If unspecified, at most 50 processors will be returned.
|
@@ -795,8 +804,9 @@ module Google
|
|
795
804
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
796
805
|
#
|
797
806
|
# @param parent [::String]
|
798
|
-
# Required. The parent (project, location and processor) to create the new
|
799
|
-
# Format:
|
807
|
+
# Required. The parent (project, location and processor) to create the new
|
808
|
+
# version for. Format:
|
809
|
+
# `projects/{project}/locations/{location}/processors/{processor}`.
|
800
810
|
# @param processor_version [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion, ::Hash]
|
801
811
|
# Required. The processor version to be created.
|
802
812
|
# @param document_schema [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema, ::Hash]
|
@@ -804,8 +814,8 @@ module Google
|
|
804
814
|
# @param input_data [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::InputData, ::Hash]
|
805
815
|
# Optional. The input data used to train the `ProcessorVersion`.
|
806
816
|
# @param base_processor_version [::String]
|
807
|
-
# Optional. The processor version to use as a base for training. This
|
808
|
-
# must be a child of `parent`. Format:
|
817
|
+
# Optional. The processor version to use as a base for training. This
|
818
|
+
# processor version must be a child of `parent`. Format:
|
809
819
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
|
810
820
|
#
|
811
821
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -984,8 +994,9 @@ module Google
|
|
984
994
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
985
995
|
#
|
986
996
|
# @param parent [::String]
|
987
|
-
# Required. The parent (project, location and processor) to list all
|
988
|
-
# Format:
|
997
|
+
# Required. The parent (project, location and processor) to list all
|
998
|
+
# versions. Format:
|
999
|
+
# `projects/{project}/locations/{location}/processors/{processor}`
|
989
1000
|
# @param page_size [::Integer]
|
990
1001
|
# The maximum number of processor versions to return.
|
991
1002
|
# If unspecified, at most 10 processor versions will be returned.
|
@@ -1365,11 +1376,12 @@ module Google
|
|
1365
1376
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1366
1377
|
#
|
1367
1378
|
# @param parent [::String]
|
1368
|
-
# Required. The parent (project and location) under which to create the
|
1369
|
-
# Format: `projects/{project}/locations/{location}`
|
1379
|
+
# Required. The parent (project and location) under which to create the
|
1380
|
+
# processor. Format: `projects/{project}/locations/{location}`
|
1370
1381
|
# @param processor [::Google::Cloud::DocumentAI::V1beta3::Processor, ::Hash]
|
1371
|
-
# Required. The processor to be created, requires [processor_type] and
|
1372
|
-
# to be set. Also, the processor is under CMEK if CMEK fields
|
1382
|
+
# Required. The processor to be created, requires [processor_type] and
|
1383
|
+
# [display_name] to be set. Also, the processor is under CMEK if CMEK fields
|
1384
|
+
# are set.
|
1373
1385
|
#
|
1374
1386
|
# @yield [response, operation] Access the result along with the RPC operation
|
1375
1387
|
# @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::Processor]
|
@@ -1716,8 +1728,10 @@ module Google
|
|
1716
1728
|
end
|
1717
1729
|
|
1718
1730
|
##
|
1719
|
-
# Set the default (active) version of a
|
1720
|
-
# {::Google::Cloud::DocumentAI::V1beta3::
|
1731
|
+
# Set the default (active) version of a
|
1732
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} that will be used in
|
1733
|
+
# {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#process_document ProcessDocument}
|
1734
|
+
# and
|
1721
1735
|
# {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
|
1722
1736
|
#
|
1723
1737
|
# @overload set_default_processor_version(request, options = nil)
|
@@ -1736,10 +1750,13 @@ module Google
|
|
1736
1750
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1737
1751
|
#
|
1738
1752
|
# @param processor [::String]
|
1739
|
-
# Required. The resource name of the
|
1753
|
+
# Required. The resource name of the
|
1754
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} to change default
|
1755
|
+
# version.
|
1740
1756
|
# @param default_processor_version [::String]
|
1741
|
-
# Required. The resource name of child
|
1742
|
-
#
|
1757
|
+
# Required. The resource name of child
|
1758
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to use
|
1759
|
+
# as default. Format:
|
1743
1760
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
|
1744
1761
|
#
|
1745
1762
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -1836,8 +1853,8 @@ module Google
|
|
1836
1853
|
# @param inline_document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
|
1837
1854
|
# An inline document proto.
|
1838
1855
|
# @param human_review_config [::String]
|
1839
|
-
# Required. The resource name of the HumanReviewConfig that the document will
|
1840
|
-
# reviewed with.
|
1856
|
+
# Required. The resource name of the HumanReviewConfig that the document will
|
1857
|
+
# be reviewed with.
|
1841
1858
|
# @param document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
|
1842
1859
|
# The document that needs human review.
|
1843
1860
|
# @param enable_schema_validation [::Boolean]
|
@@ -1939,11 +1956,13 @@ module Google
|
|
1939
1956
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1940
1957
|
#
|
1941
1958
|
# @param processor_version [::String]
|
1942
|
-
# Required. The resource name of the
|
1959
|
+
# Required. The resource name of the
|
1960
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to
|
1961
|
+
# evaluate.
|
1943
1962
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
1944
1963
|
# @param evaluation_documents [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig, ::Hash]
|
1945
|
-
# Optional. The documents used in the evaluation. If unspecified, use the
|
1946
|
-
# dataset as evaluation input.
|
1964
|
+
# Optional. The documents used in the evaluation. If unspecified, use the
|
1965
|
+
# processor's dataset as evaluation input.
|
1947
1966
|
#
|
1948
1967
|
# @yield [response, operation] Access the result along with the RPC operation
|
1949
1968
|
# @yieldparam response [::Gapic::Operation]
|
@@ -2036,7 +2055,8 @@ module Google
|
|
2036
2055
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2037
2056
|
#
|
2038
2057
|
# @param name [::String]
|
2039
|
-
# Required. The resource name of the
|
2058
|
+
# Required. The resource name of the
|
2059
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Evaluation Evaluation} to get.
|
2040
2060
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
|
2041
2061
|
#
|
2042
2062
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -2122,7 +2142,9 @@ module Google
|
|
2122
2142
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2123
2143
|
#
|
2124
2144
|
# @param parent [::String]
|
2125
|
-
# Required. The resource name of the
|
2145
|
+
# Required. The resource name of the
|
2146
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to
|
2147
|
+
# list evaluations for.
|
2126
2148
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
2127
2149
|
# @param page_size [::Integer]
|
2128
2150
|
# The standard list page size.
|
@@ -41,6 +41,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
41
41
|
optional :pages_per_shard, :int32, 1
|
42
42
|
optional :pages_overlap, :int32, 2
|
43
43
|
end
|
44
|
+
add_message "google.cloud.documentai.v1beta3.OcrConfig" do
|
45
|
+
optional :enable_native_pdf_parsing, :bool, 3
|
46
|
+
end
|
44
47
|
end
|
45
48
|
end
|
46
49
|
|
@@ -56,6 +59,7 @@ module Google
|
|
56
59
|
DocumentOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentOutputConfig").msgclass
|
57
60
|
DocumentOutputConfig::GcsOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig").msgclass
|
58
61
|
DocumentOutputConfig::GcsOutputConfig::ShardingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig").msgclass
|
62
|
+
OcrConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.OcrConfig").msgclass
|
59
63
|
end
|
60
64
|
end
|
61
65
|
end
|
@@ -21,11 +21,15 @@ require 'google/rpc/status_pb'
|
|
21
21
|
|
22
22
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
23
23
|
add_file("google/cloud/documentai/v1beta3/document_processor_service.proto", :syntax => :proto3) do
|
24
|
+
add_message "google.cloud.documentai.v1beta3.ProcessOptions" do
|
25
|
+
optional :ocr_config, :message, 1, "google.cloud.documentai.v1beta3.OcrConfig"
|
26
|
+
end
|
24
27
|
add_message "google.cloud.documentai.v1beta3.ProcessRequest" do
|
25
28
|
optional :name, :string, 1
|
26
29
|
optional :document, :message, 2, "google.cloud.documentai.v1beta3.Document"
|
27
30
|
optional :skip_human_review, :bool, 3
|
28
31
|
optional :field_mask, :message, 6, "google.protobuf.FieldMask"
|
32
|
+
optional :process_options, :message, 7, "google.cloud.documentai.v1beta3.ProcessOptions"
|
29
33
|
oneof :source do
|
30
34
|
optional :inline_document, :message, 4, "google.cloud.documentai.v1beta3.Document"
|
31
35
|
optional :raw_document, :message, 5, "google.cloud.documentai.v1beta3.RawDocument"
|
@@ -55,6 +59,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
55
59
|
optional :input_documents, :message, 5, "google.cloud.documentai.v1beta3.BatchDocumentsInputConfig"
|
56
60
|
optional :document_output_config, :message, 6, "google.cloud.documentai.v1beta3.DocumentOutputConfig"
|
57
61
|
optional :skip_human_review, :bool, 4
|
62
|
+
optional :process_options, :message, 7, "google.cloud.documentai.v1beta3.ProcessOptions"
|
58
63
|
end
|
59
64
|
add_message "google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig" do
|
60
65
|
optional :gcs_source, :string, 1
|
@@ -278,6 +283,7 @@ module Google
|
|
278
283
|
module Cloud
|
279
284
|
module DocumentAI
|
280
285
|
module V1beta3
|
286
|
+
ProcessOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ProcessOptions").msgclass
|
281
287
|
ProcessRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ProcessRequest").msgclass
|
282
288
|
HumanReviewStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.HumanReviewStatus").msgclass
|
283
289
|
HumanReviewStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.HumanReviewStatus.State").enummodule
|
@@ -75,8 +75,10 @@ module Google
|
|
75
75
|
rpc :EnableProcessor, ::Google::Cloud::DocumentAI::V1beta3::EnableProcessorRequest, ::Google::Longrunning::Operation
|
76
76
|
# Disables a processor
|
77
77
|
rpc :DisableProcessor, ::Google::Cloud::DocumentAI::V1beta3::DisableProcessorRequest, ::Google::Longrunning::Operation
|
78
|
-
# Set the default (active) version of a
|
79
|
-
# [
|
78
|
+
# Set the default (active) version of a
|
79
|
+
# [Processor][google.cloud.documentai.v1beta3.Processor] that will be used in
|
80
|
+
# [ProcessDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ProcessDocument]
|
81
|
+
# and
|
80
82
|
# [BatchProcessDocuments][google.cloud.documentai.v1beta3.DocumentProcessorService.BatchProcessDocuments].
|
81
83
|
rpc :SetDefaultProcessorVersion, ::Google::Cloud::DocumentAI::V1beta3::SetDefaultProcessorVersionRequest, ::Google::Longrunning::Operation
|
82
84
|
# Send a document for Human Review. The input document should be processed by
|
@@ -15,6 +15,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
15
|
repeated :available_locations, :message, 4, "google.cloud.documentai.v1beta3.ProcessorType.LocationInfo"
|
16
16
|
optional :allow_creation, :bool, 6
|
17
17
|
optional :launch_stage, :enum, 8, "google.api.LaunchStage"
|
18
|
+
repeated :sample_document_uris, :string, 9
|
18
19
|
end
|
19
20
|
add_message "google.cloud.documentai.v1beta3.ProcessorType.LocationInfo" do
|
20
21
|
optional :location_id, :string, 1
|
@@ -47,22 +47,27 @@ module Google
|
|
47
47
|
# Optional. UTF-8 encoded text in reading order from the document.
|
48
48
|
# @!attribute [rw] text_styles
|
49
49
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>]
|
50
|
-
#
|
50
|
+
# Styles for the
|
51
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
51
52
|
# @!attribute [rw] pages
|
52
53
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>]
|
53
|
-
# Visual page layout for the
|
54
|
+
# Visual page layout for the
|
55
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
54
56
|
# @!attribute [rw] entities
|
55
57
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>]
|
56
|
-
# A list of entities detected on
|
57
|
-
#
|
58
|
+
# A list of entities detected on
|
59
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. For
|
60
|
+
# document shards, entities in this list may cross shard boundaries.
|
58
61
|
# @!attribute [rw] entity_relations
|
59
62
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>]
|
60
|
-
# Placeholder. Relationship among
|
63
|
+
# Placeholder. Relationship among
|
64
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#entities Document.entities}.
|
61
65
|
# @!attribute [rw] text_changes
|
62
66
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>]
|
63
|
-
# Placeholder. A list of text corrections made to
|
64
|
-
#
|
65
|
-
#
|
67
|
+
# Placeholder. A list of text corrections made to
|
68
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. This is
|
69
|
+
# usually used for annotating corrections to OCR mistakes. Text changes for
|
70
|
+
# a given revision may not overlap with each other.
|
66
71
|
# @!attribute [rw] shard_info
|
67
72
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo]
|
68
73
|
# Information about the sharding if this document is sharded part of a larger
|
@@ -88,8 +93,9 @@ module Google
|
|
88
93
|
# Total number of shards.
|
89
94
|
# @!attribute [rw] text_offset
|
90
95
|
# @return [::Integer]
|
91
|
-
# The index of the first character in
|
92
|
-
#
|
96
|
+
# The index of the first character in
|
97
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the
|
98
|
+
# overall document global text.
|
93
99
|
class ShardInfo
|
94
100
|
include ::Google::Protobuf::MessageExts
|
95
101
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -99,7 +105,8 @@ module Google
|
|
99
105
|
# conventions as much as possible.
|
100
106
|
# @!attribute [rw] text_anchor
|
101
107
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
102
|
-
# Text anchor indexing into the
|
108
|
+
# Text anchor indexing into the
|
109
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
103
110
|
# @!attribute [rw] color
|
104
111
|
# @return [::Google::Type::Color]
|
105
112
|
# Text color.
|
@@ -146,9 +153,11 @@ module Google
|
|
146
153
|
# A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
147
154
|
# @!attribute [rw] page_number
|
148
155
|
# @return [::Integer]
|
149
|
-
# 1-based index for current
|
150
|
-
#
|
151
|
-
#
|
156
|
+
# 1-based index for current
|
157
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent
|
158
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document Document}. Useful when a page
|
159
|
+
# is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document}
|
160
|
+
# for individual processing.
|
152
161
|
# @!attribute [rw] image
|
153
162
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image]
|
154
163
|
# Rendered image for this page. This image is preprocessed to remove any
|
@@ -157,13 +166,15 @@ module Google
|
|
157
166
|
# @!attribute [rw] transforms
|
158
167
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>]
|
159
168
|
# Transformation matrices that were applied to the original document image
|
160
|
-
# to produce
|
169
|
+
# to produce
|
170
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}.
|
161
171
|
# @!attribute [rw] dimension
|
162
172
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension]
|
163
173
|
# Physical dimension of the page.
|
164
174
|
# @!attribute [rw] layout
|
165
175
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
166
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
176
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
177
|
+
# page.
|
167
178
|
# @!attribute [rw] detected_languages
|
168
179
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
169
180
|
# A list of detected languages together with confidence.
|
@@ -267,18 +278,23 @@ module Google
|
|
267
278
|
# Visual element describing a layout unit on a page.
|
268
279
|
# @!attribute [rw] text_anchor
|
269
280
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
270
|
-
# Text anchor indexing into the
|
281
|
+
# Text anchor indexing into the
|
282
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
271
283
|
# @!attribute [rw] confidence
|
272
284
|
# @return [::Float]
|
273
|
-
# Confidence of the current
|
274
|
-
#
|
275
|
-
#
|
285
|
+
# Confidence of the current
|
286
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within
|
287
|
+
# context of the object this layout is for. e.g. confidence can be for a
|
288
|
+
# single token, a table, a visual element, etc. depending on context.
|
289
|
+
# Range `[0, 1]`.
|
276
290
|
# @!attribute [rw] bounding_poly
|
277
291
|
# @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
|
278
|
-
# The bounding polygon for the
|
292
|
+
# The bounding polygon for the
|
293
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
279
294
|
# @!attribute [rw] orientation
|
280
295
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation]
|
281
|
-
# Detected orientation for the
|
296
|
+
# Detected orientation for the
|
297
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
282
298
|
class Layout
|
283
299
|
include ::Google::Protobuf::MessageExts
|
284
300
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -309,7 +325,8 @@ module Google
|
|
309
325
|
# common line-spacing and orientation.
|
310
326
|
# @!attribute [rw] layout
|
311
327
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
312
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
328
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
329
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}.
|
313
330
|
# @!attribute [rw] detected_languages
|
314
331
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
315
332
|
# A list of detected languages together with confidence.
|
@@ -324,7 +341,8 @@ module Google
|
|
324
341
|
# A collection of lines that a human would perceive as a paragraph.
|
325
342
|
# @!attribute [rw] layout
|
326
343
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
327
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
344
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
345
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}.
|
328
346
|
# @!attribute [rw] detected_languages
|
329
347
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
330
348
|
# A list of detected languages together with confidence.
|
@@ -340,7 +358,8 @@ module Google
|
|
340
358
|
# Does not cross column boundaries, can be horizontal, vertical, etc.
|
341
359
|
# @!attribute [rw] layout
|
342
360
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
343
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
361
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
362
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}.
|
344
363
|
# @!attribute [rw] detected_languages
|
345
364
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
346
365
|
# A list of detected languages together with confidence.
|
@@ -355,10 +374,12 @@ module Google
|
|
355
374
|
# A detected token.
|
356
375
|
# @!attribute [rw] layout
|
357
376
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
358
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
377
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
378
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
359
379
|
# @!attribute [rw] detected_break
|
360
380
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak]
|
361
|
-
# Detected break at the end of a
|
381
|
+
# Detected break at the end of a
|
382
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
362
383
|
# @!attribute [rw] detected_languages
|
363
384
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
364
385
|
# A list of detected languages together with confidence.
|
@@ -369,7 +390,8 @@ module Google
|
|
369
390
|
include ::Google::Protobuf::MessageExts
|
370
391
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
371
392
|
|
372
|
-
# Detected break at the end of a
|
393
|
+
# Detected break at the end of a
|
394
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
373
395
|
# @!attribute [rw] type
|
374
396
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
|
375
397
|
# Detected break type.
|
@@ -397,7 +419,8 @@ module Google
|
|
397
419
|
# A detected symbol.
|
398
420
|
# @!attribute [rw] layout
|
399
421
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
400
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
422
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
423
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}.
|
401
424
|
# @!attribute [rw] detected_languages
|
402
425
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
403
426
|
# A list of detected languages together with confidence.
|
@@ -410,10 +433,12 @@ module Google
|
|
410
433
|
# page.
|
411
434
|
# @!attribute [rw] layout
|
412
435
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
413
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
436
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
437
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
414
438
|
# @!attribute [rw] type
|
415
439
|
# @return [::String]
|
416
|
-
# Type of the
|
440
|
+
# Type of the
|
441
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
417
442
|
# @!attribute [rw] detected_languages
|
418
443
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
419
444
|
# A list of detected languages together with confidence.
|
@@ -425,7 +450,8 @@ module Google
|
|
425
450
|
# A table representation similar to HTML table structure.
|
426
451
|
# @!attribute [rw] layout
|
427
452
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
428
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
453
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
454
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}.
|
429
455
|
# @!attribute [rw] header_rows
|
430
456
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>]
|
431
457
|
# Header rows of the table.
|
@@ -454,7 +480,8 @@ module Google
|
|
454
480
|
# A cell representation inside the table.
|
455
481
|
# @!attribute [rw] layout
|
456
482
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
457
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
483
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
484
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}.
|
458
485
|
# @!attribute [rw] row_span
|
459
486
|
# @return [::Integer]
|
460
487
|
# How many rows this cell spans.
|
@@ -473,11 +500,14 @@ module Google
|
|
473
500
|
# A form field detected on the page.
|
474
501
|
# @!attribute [rw] field_name
|
475
502
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
476
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
477
|
-
#
|
503
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
504
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField}
|
505
|
+
# name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
|
478
506
|
# @!attribute [rw] field_value
|
479
507
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
480
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
508
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the
|
509
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField}
|
510
|
+
# value.
|
481
511
|
# @!attribute [rw] name_detected_languages
|
482
512
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
483
513
|
# A list of detected languages for name together with confidence.
|
@@ -488,9 +518,10 @@ module Google
|
|
488
518
|
# @return [::String]
|
489
519
|
# If the value is non-textual, this field represents the type. Current
|
490
520
|
# valid values are:
|
491
|
-
#
|
492
|
-
# -
|
493
|
-
# -
|
521
|
+
#
|
522
|
+
# - blank (this indicates the `field_value` is normal text)
|
523
|
+
# - `unfilled_checkbox`
|
524
|
+
# - `filled_checkbox`
|
494
525
|
# @!attribute [rw] corrected_key_text
|
495
526
|
# @return [::String]
|
496
527
|
# Created for Labeling UI to export key text.
|
@@ -512,10 +543,12 @@ module Google
|
|
512
543
|
# A detected barcode.
|
513
544
|
# @!attribute [rw] layout
|
514
545
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
515
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
546
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for
|
547
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}.
|
516
548
|
# @!attribute [rw] barcode
|
517
549
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Barcode]
|
518
|
-
# Detailed barcode information of the
|
550
|
+
# Detailed barcode information of the
|
551
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}.
|
519
552
|
class DetectedBarcode
|
520
553
|
include ::Google::Protobuf::MessageExts
|
521
554
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -576,7 +609,8 @@ module Google
|
|
576
609
|
# @!attribute [rw] text_anchor
|
577
610
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
578
611
|
# Optional. Provenance of the entity.
|
579
|
-
# Text anchor indexing into the
|
612
|
+
# Text anchor indexing into the
|
613
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
580
614
|
# @!attribute [rw] type
|
581
615
|
# @return [::String]
|
582
616
|
# Required. Entity type from a schema e.g. `Address`.
|
@@ -591,28 +625,29 @@ module Google
|
|
591
625
|
# Optional. Confidence of detected Schema entity. Range `[0, 1]`.
|
592
626
|
# @!attribute [rw] page_anchor
|
593
627
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor]
|
594
|
-
# Optional. Represents the provenance of this entity wrt. the location on
|
595
|
-
# page where it was found.
|
628
|
+
# Optional. Represents the provenance of this entity wrt. the location on
|
629
|
+
# the page where it was found.
|
596
630
|
# @!attribute [rw] id
|
597
631
|
# @return [::String]
|
598
632
|
# Optional. Canonical id. This will be a unique value in the entity list
|
599
633
|
# for this document.
|
600
634
|
# @!attribute [rw] normalized_value
|
601
635
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue]
|
602
|
-
# Optional. Normalized entity value. Absent if the extracted value could
|
603
|
-
# converted or the type (e.g. address) is not supported for certain
|
636
|
+
# Optional. Normalized entity value. Absent if the extracted value could
|
637
|
+
# not be converted or the type (e.g. address) is not supported for certain
|
604
638
|
# parsers. This field is also only populated for certain supported document
|
605
639
|
# types.
|
606
640
|
# @!attribute [rw] properties
|
607
641
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>]
|
608
|
-
# Optional. Entities can be nested to form a hierarchical data structure
|
609
|
-
# the content in the document.
|
642
|
+
# Optional. Entities can be nested to form a hierarchical data structure
|
643
|
+
# representing the content in the document.
|
610
644
|
# @!attribute [rw] provenance
|
611
645
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
612
646
|
# Optional. The history of this annotation.
|
613
647
|
# @!attribute [rw] redacted
|
614
648
|
# @return [::Boolean]
|
615
|
-
# Optional. Whether the entity will be redacted for de-identification
|
649
|
+
# Optional. Whether the entity will be redacted for de-identification
|
650
|
+
# purposes.
|
616
651
|
class Entity
|
617
652
|
include ::Google::Protobuf::MessageExts
|
618
653
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -649,8 +684,8 @@ module Google
|
|
649
684
|
# Optional. An optional field to store a normalized string.
|
650
685
|
# For some entity types, one of respective `structured_value` fields may
|
651
686
|
# also be populated. Also not all the types of `structured_value` will be
|
652
|
-
# normalized. For example, some processors may not generate float
|
653
|
-
# or
|
687
|
+
# normalized. For example, some processors may not generate `float`
|
688
|
+
# or `integer` normalized text by default.
|
654
689
|
#
|
655
690
|
# Below are sample formats mapped to structured values.
|
656
691
|
#
|
@@ -663,7 +698,8 @@ module Google
|
|
663
698
|
end
|
664
699
|
end
|
665
700
|
|
666
|
-
# Relationship between
|
701
|
+
# Relationship between
|
702
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}.
|
667
703
|
# @!attribute [rw] subject_id
|
668
704
|
# @return [::String]
|
669
705
|
# Subject entity id.
|
@@ -678,10 +714,12 @@ module Google
|
|
678
714
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
679
715
|
end
|
680
716
|
|
681
|
-
# Text reference indexing into the
|
717
|
+
# Text reference indexing into the
|
718
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
682
719
|
# @!attribute [rw] text_segments
|
683
720
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>]
|
684
|
-
# The text segments from the
|
721
|
+
# The text segments from the
|
722
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
685
723
|
# @!attribute [rw] content
|
686
724
|
# @return [::String]
|
687
725
|
# Contains the content of the text span so that users do
|
@@ -691,15 +729,20 @@ module Google
|
|
691
729
|
include ::Google::Protobuf::MessageExts
|
692
730
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
693
731
|
|
694
|
-
# A text segment in the
|
695
|
-
#
|
696
|
-
#
|
732
|
+
# A text segment in the
|
733
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The
|
734
|
+
# indices may be out of bounds which indicate that the text extends into
|
735
|
+
# another document shard for large sharded documents. See
|
736
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
697
737
|
# @!attribute [rw] start_index
|
698
738
|
# @return [::Integer]
|
699
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
|
739
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
|
740
|
+
# start UTF-8 char index in the
|
741
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
700
742
|
# @!attribute [rw] end_index
|
701
743
|
# @return [::Integer]
|
702
|
-
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
|
744
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment}
|
745
|
+
# half open end UTF-8 char index in the
|
703
746
|
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
704
747
|
class TextSegment
|
705
748
|
include ::Google::Protobuf::MessageExts
|
@@ -707,8 +750,9 @@ module Google
|
|
707
750
|
end
|
708
751
|
end
|
709
752
|
|
710
|
-
# Referencing the visual context of the entity in the
|
711
|
-
#
|
753
|
+
# Referencing the visual context of the entity in the
|
754
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}. Page
|
755
|
+
# anchors can be cross-page, consist of multiple bounding polygons and
|
712
756
|
# optionally reference specific layout element types.
|
713
757
|
# @!attribute [rw] page_refs
|
714
758
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>]
|
@@ -720,22 +764,29 @@ module Google
|
|
720
764
|
# Represents a weak reference to a page element within a document.
|
721
765
|
# @!attribute [rw] page
|
722
766
|
# @return [::Integer]
|
723
|
-
# Required. Index into the
|
724
|
-
#
|
725
|
-
#
|
767
|
+
# Required. Index into the
|
768
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}
|
769
|
+
# element, for example using
|
770
|
+
# `[Document.pages][page_refs.page]` to locate the related page element.
|
771
|
+
# This field is skipped when its value is the default `0`. See
|
726
772
|
# https://developers.google.com/protocol-buffers/docs/proto3#json.
|
727
773
|
# @!attribute [rw] layout_type
|
728
774
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType]
|
729
|
-
# Optional. The type of the layout element that is being referenced if
|
775
|
+
# Optional. The type of the layout element that is being referenced if
|
776
|
+
# any.
|
730
777
|
# @!attribute [rw] layout_id
|
731
778
|
# @return [::String]
|
732
|
-
# Optional. Deprecated. Use
|
779
|
+
# Optional. Deprecated. Use
|
780
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly}
|
781
|
+
# instead.
|
733
782
|
# @!attribute [rw] bounding_poly
|
734
783
|
# @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
|
735
|
-
# Optional. Identifies the bounding polygon of a layout element on the
|
784
|
+
# Optional. Identifies the bounding polygon of a layout element on the
|
785
|
+
# page.
|
736
786
|
# @!attribute [rw] confidence
|
737
787
|
# @return [::Float]
|
738
|
-
# Optional. Confidence of detected page element, if applicable. Range
|
788
|
+
# Optional. Confidence of detected page element, if applicable. Range
|
789
|
+
# `[0, 1]`.
|
739
790
|
class PageRef
|
740
791
|
include ::Google::Protobuf::MessageExts
|
741
792
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -745,25 +796,39 @@ module Google
|
|
745
796
|
# Layout Unspecified.
|
746
797
|
LAYOUT_TYPE_UNSPECIFIED = 0
|
747
798
|
|
748
|
-
# References a
|
799
|
+
# References a
|
800
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks}
|
801
|
+
# element.
|
749
802
|
BLOCK = 1
|
750
803
|
|
751
|
-
# References a
|
804
|
+
# References a
|
805
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs}
|
806
|
+
# element.
|
752
807
|
PARAGRAPH = 2
|
753
808
|
|
754
|
-
# References a
|
809
|
+
# References a
|
810
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines}
|
811
|
+
# element.
|
755
812
|
LINE = 3
|
756
813
|
|
757
|
-
# References a
|
814
|
+
# References a
|
815
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens}
|
816
|
+
# element.
|
758
817
|
TOKEN = 4
|
759
818
|
|
760
|
-
# References a
|
819
|
+
# References a
|
820
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements}
|
821
|
+
# element.
|
761
822
|
VISUAL_ELEMENT = 5
|
762
823
|
|
763
|
-
# Refrrences a
|
824
|
+
# Refrrences a
|
825
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables}
|
826
|
+
# element.
|
764
827
|
TABLE = 6
|
765
828
|
|
766
|
-
# References a
|
829
|
+
# References a
|
830
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields}
|
831
|
+
# element.
|
767
832
|
FORM_FIELD = 7
|
768
833
|
end
|
769
834
|
end
|
@@ -882,10 +947,11 @@ module Google
|
|
882
947
|
# @!attribute [rw] text_anchor
|
883
948
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
884
949
|
# Provenance of the correction.
|
885
|
-
# Text anchor indexing into the
|
886
|
-
#
|
887
|
-
#
|
888
|
-
#
|
950
|
+
# Text anchor indexing into the
|
951
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There
|
952
|
+
# can only be a single `TextAnchor.text_segments` element. If the start
|
953
|
+
# and end index of the text segment are the same, the text change is
|
954
|
+
# inserted before that index.
|
889
955
|
# @!attribute [rw] changed_text
|
890
956
|
# @return [::String]
|
891
957
|
# The text that replaces the text identified in the `text_anchor`.
|
@@ -114,6 +114,16 @@ module Google
|
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
117
|
+
|
118
|
+
# Config for Document OCR.
|
119
|
+
# @!attribute [rw] enable_native_pdf_parsing
|
120
|
+
# @return [::Boolean]
|
121
|
+
# Enables special handling for PDFs with existing text information. Results
|
122
|
+
# in better text extraction quality in such PDF inputs.
|
123
|
+
class OcrConfig
|
124
|
+
include ::Google::Protobuf::MessageExts
|
125
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
126
|
+
end
|
117
127
|
end
|
118
128
|
end
|
119
129
|
end
|
@@ -21,6 +21,16 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module DocumentAI
|
23
23
|
module V1beta3
|
24
|
+
# Options for Process API
|
25
|
+
# @!attribute [rw] ocr_config
|
26
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::OcrConfig]
|
27
|
+
# Only applicable to "Document OCR Processor". Returns error if set on other
|
28
|
+
# processor types.
|
29
|
+
class ProcessOptions
|
30
|
+
include ::Google::Protobuf::MessageExts
|
31
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
32
|
+
end
|
33
|
+
|
24
34
|
# Request message for the process document method.
|
25
35
|
# @!attribute [rw] inline_document
|
26
36
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document]
|
@@ -30,11 +40,15 @@ module Google
|
|
30
40
|
# A raw document content (bytes).
|
31
41
|
# @!attribute [rw] name
|
32
42
|
# @return [::String]
|
33
|
-
# Required. The resource name of the
|
43
|
+
# Required. The resource name of the
|
44
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
|
34
45
|
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}
|
35
|
-
# to use for processing. If a
|
36
|
-
#
|
37
|
-
#
|
46
|
+
# to use for processing. If a
|
47
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} is specified, the
|
48
|
+
# server will use its [default
|
49
|
+
# version][google.cloud.documentai.v1beta3.Processor.default_processor_version].
|
50
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
51
|
+
# or
|
38
52
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
39
53
|
# @!attribute [rw] document
|
40
54
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document]
|
@@ -48,6 +62,9 @@ module Google
|
|
48
62
|
# Specifies which fields to include in ProcessResponse's document.
|
49
63
|
# Only supports top level document and pages field so it must be in the form
|
50
64
|
# of `{document_field_name}` or `pages.{page_field_name}`.
|
65
|
+
# @!attribute [rw] process_options
|
66
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::ProcessOptions]
|
67
|
+
# Inference-time options for the process API
|
51
68
|
class ProcessRequest
|
52
69
|
include ::Google::Protobuf::MessageExts
|
53
70
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -114,7 +131,8 @@ module Google
|
|
114
131
|
# Request message for batch process document method.
|
115
132
|
# @!attribute [rw] name
|
116
133
|
# @return [::String]
|
117
|
-
# Required. The resource name of
|
134
|
+
# Required. The resource name of
|
135
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
|
118
136
|
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
|
119
137
|
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
120
138
|
# or
|
@@ -135,6 +153,9 @@ module Google
|
|
135
153
|
# @return [::Boolean]
|
136
154
|
# Whether Human Review feature should be skipped for this request. Default to
|
137
155
|
# false.
|
156
|
+
# @!attribute [rw] process_options
|
157
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::ProcessOptions]
|
158
|
+
# Inference-time options for the process API
|
138
159
|
class BatchProcessRequest
|
139
160
|
include ::Google::Protobuf::MessageExts
|
140
161
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,8 +318,8 @@ module Google
|
|
297
318
|
# Request message for list all processors belongs to a project.
|
298
319
|
# @!attribute [rw] parent
|
299
320
|
# @return [::String]
|
300
|
-
# Required. The parent (project and location) which owns this collection of
|
301
|
-
# Format: `projects/{project}/locations/{location}`
|
321
|
+
# Required. The parent (project and location) which owns this collection of
|
322
|
+
# Processors. Format: `projects/{project}/locations/{location}`
|
302
323
|
# @!attribute [rw] page_size
|
303
324
|
# @return [::Integer]
|
304
325
|
# The maximum number of processors to return.
|
@@ -346,8 +367,9 @@ module Google
|
|
346
367
|
# Request message for list all processor versions belongs to a processor.
|
347
368
|
# @!attribute [rw] parent
|
348
369
|
# @return [::String]
|
349
|
-
# Required. The parent (project, location and processor) to list all
|
350
|
-
# Format:
|
370
|
+
# Required. The parent (project, location and processor) to list all
|
371
|
+
# versions. Format:
|
372
|
+
# `projects/{project}/locations/{location}/processors/{processor}`
|
351
373
|
# @!attribute [rw] page_size
|
352
374
|
# @return [::Integer]
|
353
375
|
# The maximum number of processor versions to return.
|
@@ -446,12 +468,13 @@ module Google
|
|
446
468
|
# on that region, the creation will fail.
|
447
469
|
# @!attribute [rw] parent
|
448
470
|
# @return [::String]
|
449
|
-
# Required. The parent (project and location) under which to create the
|
450
|
-
# Format: `projects/{project}/locations/{location}`
|
471
|
+
# Required. The parent (project and location) under which to create the
|
472
|
+
# processor. Format: `projects/{project}/locations/{location}`
|
451
473
|
# @!attribute [rw] processor
|
452
474
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Processor]
|
453
|
-
# Required. The processor to be created, requires [processor_type] and
|
454
|
-
# to be set. Also, the processor is under CMEK if CMEK fields
|
475
|
+
# Required. The processor to be created, requires [processor_type] and
|
476
|
+
# [display_name] to be set. Also, the processor is under CMEK if CMEK fields
|
477
|
+
# are set.
|
455
478
|
class CreateProcessorRequest
|
456
479
|
include ::Google::Protobuf::MessageExts
|
457
480
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -528,11 +551,14 @@ module Google
|
|
528
551
|
# Request message for the set default processor version method.
|
529
552
|
# @!attribute [rw] processor
|
530
553
|
# @return [::String]
|
531
|
-
# Required. The resource name of the
|
554
|
+
# Required. The resource name of the
|
555
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} to change default
|
556
|
+
# version.
|
532
557
|
# @!attribute [rw] default_processor_version
|
533
558
|
# @return [::String]
|
534
|
-
# Required. The resource name of child
|
535
|
-
#
|
559
|
+
# Required. The resource name of child
|
560
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to use
|
561
|
+
# as default. Format:
|
536
562
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
|
537
563
|
class SetDefaultProcessorVersionRequest
|
538
564
|
include ::Google::Protobuf::MessageExts
|
@@ -558,8 +584,9 @@ module Google
|
|
558
584
|
# Request message for the create processor version method.
|
559
585
|
# @!attribute [rw] parent
|
560
586
|
# @return [::String]
|
561
|
-
# Required. The parent (project, location and processor) to create the new
|
562
|
-
# Format:
|
587
|
+
# Required. The parent (project, location and processor) to create the new
|
588
|
+
# version for. Format:
|
589
|
+
# `projects/{project}/locations/{location}/processors/{processor}`.
|
563
590
|
# @!attribute [rw] processor_version
|
564
591
|
# @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion]
|
565
592
|
# Required. The processor version to be created.
|
@@ -571,8 +598,8 @@ module Google
|
|
571
598
|
# Optional. The input data used to train the `ProcessorVersion`.
|
572
599
|
# @!attribute [rw] base_processor_version
|
573
600
|
# @return [::String]
|
574
|
-
# Optional. The processor version to use as a base for training. This
|
575
|
-
# must be a child of `parent`. Format:
|
601
|
+
# Optional. The processor version to use as a base for training. This
|
602
|
+
# processor version must be a child of `parent`. Format:
|
576
603
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
|
577
604
|
class TrainProcessorVersionRequest
|
578
605
|
include ::Google::Protobuf::MessageExts
|
@@ -644,8 +671,8 @@ module Google
|
|
644
671
|
# An inline document proto.
|
645
672
|
# @!attribute [rw] human_review_config
|
646
673
|
# @return [::String]
|
647
|
-
# Required. The resource name of the HumanReviewConfig that the document will
|
648
|
-
# reviewed with.
|
674
|
+
# Required. The resource name of the HumanReviewConfig that the document will
|
675
|
+
# be reviewed with.
|
649
676
|
# @!attribute [rw] document
|
650
677
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document]
|
651
678
|
# The document that needs human review.
|
@@ -750,12 +777,14 @@ module Google
|
|
750
777
|
# Evaluates the given ProcessorVersion against the supplied documents.
|
751
778
|
# @!attribute [rw] processor_version
|
752
779
|
# @return [::String]
|
753
|
-
# Required. The resource name of the
|
780
|
+
# Required. The resource name of the
|
781
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to
|
782
|
+
# evaluate.
|
754
783
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
755
784
|
# @!attribute [rw] evaluation_documents
|
756
785
|
# @return [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig]
|
757
|
-
# Optional. The documents used in the evaluation. If unspecified, use the
|
758
|
-
# dataset as evaluation input.
|
786
|
+
# Optional. The documents used in the evaluation. If unspecified, use the
|
787
|
+
# processor's dataset as evaluation input.
|
759
788
|
class EvaluateProcessorVersionRequest
|
760
789
|
include ::Google::Protobuf::MessageExts
|
761
790
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -782,7 +811,8 @@ module Google
|
|
782
811
|
# Retrieves a specific Evaluation.
|
783
812
|
# @!attribute [rw] name
|
784
813
|
# @return [::String]
|
785
|
-
# Required. The resource name of the
|
814
|
+
# Required. The resource name of the
|
815
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Evaluation Evaluation} to get.
|
786
816
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
|
787
817
|
class GetEvaluationRequest
|
788
818
|
include ::Google::Protobuf::MessageExts
|
@@ -792,7 +822,9 @@ module Google
|
|
792
822
|
# Retrieves a list of evaluations for a given ProcessorVersion.
|
793
823
|
# @!attribute [rw] parent
|
794
824
|
# @return [::String]
|
795
|
-
# Required. The resource name of the
|
825
|
+
# Required. The resource name of the
|
826
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to
|
827
|
+
# list evaluations for.
|
796
828
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
797
829
|
# @!attribute [rw] page_size
|
798
830
|
# @return [::Integer]
|
@@ -58,7 +58,7 @@ module Google
|
|
58
58
|
# conventions:
|
59
59
|
#
|
60
60
|
# - *use `snake_casing`*
|
61
|
-
# - name matching is case-
|
61
|
+
# - name matching is case-sensitive
|
62
62
|
# - Maximum 64 characters.
|
63
63
|
# - Must start with a letter.
|
64
64
|
# - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward
|
@@ -121,7 +121,8 @@ module Google
|
|
121
121
|
# The default processor version.
|
122
122
|
# @!attribute [r] process_endpoint
|
123
123
|
# @return [::String]
|
124
|
-
# Output only. Immutable. The http endpoint that can be called to invoke
|
124
|
+
# Output only. Immutable. The http endpoint that can be called to invoke
|
125
|
+
# processing.
|
125
126
|
# @!attribute [rw] create_time
|
126
127
|
# @return [::Google::Protobuf::Timestamp]
|
127
128
|
# The time the processor was created.
|
@@ -43,6 +43,9 @@ module Google
|
|
43
43
|
# @!attribute [rw] launch_stage
|
44
44
|
# @return [::Google::Api::LaunchStage]
|
45
45
|
# Launch stage of the processor type
|
46
|
+
# @!attribute [rw] sample_document_uris
|
47
|
+
# @return [::Array<::String>]
|
48
|
+
# A set of Cloud Storage URIs of sample documents for this processor.
|
46
49
|
class ProcessorType
|
47
50
|
include ::Google::Protobuf::MessageExts
|
48
51
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
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.
|
4
|
+
version: 0.16.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-12-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|