aws-sdk-textract 1.37.0 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-textract/client.rb +69 -15
- data/lib/aws-sdk-textract/client_api.rb +21 -0
- data/lib/aws-sdk-textract/types.rb +122 -9
- data/lib/aws-sdk-textract.rb +1 -1
- 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: 1c0745ba62589de2b8ca471baf1dcf0d2b6c00fa02a261932fe84c60f142a809
|
4
|
+
data.tar.gz: 566d64e6b216f71f6499a0a6d8fc5d3024eb55a446222201bd8f53a688e312f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b02e10bf8525c1b58e411b321cbe87c26aaa2c06ff1541241e4c74daac1e4eba98af115a20805e3d49b84e3215ac15b4574a35eed49f406f477ebbb85360bf
|
7
|
+
data.tar.gz: ba5841d57712faf447a8c7596e5bdb75fe0251a0ed4ec39f7ba73c9f0916172cfc85a0c2c0b96a6ee927dee360569f68d3d9b5b6cf1e93b4aef0861c9ac535f9
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.38.0 (2022-04-19)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This release adds support for specifying and extracting information from documents using the Queries feature within Analyze Document API
|
8
|
+
|
4
9
|
1.37.0 (2022-02-24)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.38.0
|
@@ -380,6 +380,11 @@ module Aws::Textract
|
|
380
380
|
# document are returned (including text that doesn't have a
|
381
381
|
# relationship with the value of `FeatureTypes`).
|
382
382
|
#
|
383
|
+
# * Queries.A QUERIES\_RESULT Block object contains the answer to the
|
384
|
+
# query, the alias associated and an ID that connect it to the query
|
385
|
+
# asked. This Block also contains a location and attached confidence
|
386
|
+
# score.
|
387
|
+
#
|
383
388
|
# Selection elements such as check boxes and option buttons (radio
|
384
389
|
# buttons) can be detected in form data and in tables. A
|
385
390
|
# SELECTION\_ELEMENT `Block` object contains information about a
|
@@ -402,7 +407,8 @@ module Aws::Textract
|
|
402
407
|
# @option params [required, Types::Document] :document
|
403
408
|
# The input document as base64-encoded bytes or an Amazon S3 object. If
|
404
409
|
# you use the AWS CLI to call Amazon Textract operations, you can't
|
405
|
-
# pass image bytes. The document must be an image in JPEG
|
410
|
+
# pass image bytes. The document must be an image in JPEG, PNG, PDF, or
|
411
|
+
# TIFF format.
|
406
412
|
#
|
407
413
|
# If you're using an AWS SDK to call Amazon Textract, you might not
|
408
414
|
# need to base64-encode image bytes that are passed using the `Bytes`
|
@@ -420,6 +426,10 @@ module Aws::Textract
|
|
420
426
|
# Sets the configuration for the human in the loop workflow for
|
421
427
|
# analyzing documents.
|
422
428
|
#
|
429
|
+
# @option params [Types::QueriesConfig] :queries_config
|
430
|
+
# Contains Queries and the alias for those Queries, as determined by the
|
431
|
+
# input.
|
432
|
+
#
|
423
433
|
# @return [Types::AnalyzeDocumentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
424
434
|
#
|
425
435
|
# * {Types::AnalyzeDocumentResponse#document_metadata #document_metadata} => Types::DocumentMetadata
|
@@ -438,7 +448,7 @@ module Aws::Textract
|
|
438
448
|
# version: "S3ObjectVersion",
|
439
449
|
# },
|
440
450
|
# },
|
441
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
451
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
442
452
|
# human_loop_config: {
|
443
453
|
# human_loop_name: "HumanLoopName", # required
|
444
454
|
# flow_definition_arn: "FlowDefinitionArn", # required
|
@@ -446,13 +456,22 @@ module Aws::Textract
|
|
446
456
|
# content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
|
447
457
|
# },
|
448
458
|
# },
|
459
|
+
# queries_config: {
|
460
|
+
# queries: [ # required
|
461
|
+
# {
|
462
|
+
# text: "QueryInput", # required
|
463
|
+
# alias: "QueryInput",
|
464
|
+
# pages: ["QueryPage"],
|
465
|
+
# },
|
466
|
+
# ],
|
467
|
+
# },
|
449
468
|
# })
|
450
469
|
#
|
451
470
|
# @example Response structure
|
452
471
|
#
|
453
472
|
# resp.document_metadata.pages #=> Integer
|
454
473
|
# resp.blocks #=> Array
|
455
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE"
|
474
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
456
475
|
# resp.blocks[0].confidence #=> Float
|
457
476
|
# resp.blocks[0].text #=> String
|
458
477
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
@@ -469,13 +488,17 @@ module Aws::Textract
|
|
469
488
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
470
489
|
# resp.blocks[0].id #=> String
|
471
490
|
# resp.blocks[0].relationships #=> Array
|
472
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE"
|
491
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
473
492
|
# resp.blocks[0].relationships[0].ids #=> Array
|
474
493
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
475
494
|
# resp.blocks[0].entity_types #=> Array
|
476
495
|
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
477
496
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
478
497
|
# resp.blocks[0].page #=> Integer
|
498
|
+
# resp.blocks[0].query.text #=> String
|
499
|
+
# resp.blocks[0].query.alias #=> String
|
500
|
+
# resp.blocks[0].query.pages #=> Array
|
501
|
+
# resp.blocks[0].query.pages[0] #=> String
|
479
502
|
# resp.human_loop_activation_output.human_loop_arn #=> String
|
480
503
|
# resp.human_loop_activation_output.human_loop_activation_reasons #=> Array
|
481
504
|
# resp.human_loop_activation_output.human_loop_activation_reasons[0] #=> String
|
@@ -611,7 +634,9 @@ module Aws::Textract
|
|
611
634
|
|
612
635
|
# Analyzes identity documents for relevant information. This information
|
613
636
|
# is extracted and returned as `IdentityDocumentFields`, which records
|
614
|
-
# both the normalized field and value of the extracted text.
|
637
|
+
# both the normalized field and value of the extracted text.Unlike other
|
638
|
+
# Amazon Textract operations, `AnalyzeID` doesn't return any Geometry
|
639
|
+
# data.
|
615
640
|
#
|
616
641
|
# @option params [required, Array<Types::Document>] :document_pages
|
617
642
|
# The document being passed to AnalyzeID.
|
@@ -664,8 +689,9 @@ module Aws::Textract
|
|
664
689
|
|
665
690
|
# Detects text in the input document. Amazon Textract can detect lines
|
666
691
|
# of text and the words that make up a line of text. The input document
|
667
|
-
# must be an image in JPEG or
|
668
|
-
# the detected text in an array of Block
|
692
|
+
# must be an image in JPEG, PNG, PDF, or TIFF format.
|
693
|
+
# `DetectDocumentText` returns the detected text in an array of Block
|
694
|
+
# objects.
|
669
695
|
#
|
670
696
|
# Each document page has as an associated `Block` of type PAGE. Each
|
671
697
|
# PAGE `Block` object is the parent of LINE `Block` objects that
|
@@ -714,7 +740,7 @@ module Aws::Textract
|
|
714
740
|
#
|
715
741
|
# resp.document_metadata.pages #=> Integer
|
716
742
|
# resp.blocks #=> Array
|
717
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE"
|
743
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
718
744
|
# resp.blocks[0].confidence #=> Float
|
719
745
|
# resp.blocks[0].text #=> String
|
720
746
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
@@ -731,13 +757,17 @@ module Aws::Textract
|
|
731
757
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
732
758
|
# resp.blocks[0].id #=> String
|
733
759
|
# resp.blocks[0].relationships #=> Array
|
734
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE"
|
760
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
735
761
|
# resp.blocks[0].relationships[0].ids #=> Array
|
736
762
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
737
763
|
# resp.blocks[0].entity_types #=> Array
|
738
764
|
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
739
765
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
740
766
|
# resp.blocks[0].page #=> Integer
|
767
|
+
# resp.blocks[0].query.text #=> String
|
768
|
+
# resp.blocks[0].query.alias #=> String
|
769
|
+
# resp.blocks[0].query.pages #=> Array
|
770
|
+
# resp.blocks[0].query.pages[0] #=> String
|
741
771
|
# resp.detect_document_text_model_version #=> String
|
742
772
|
#
|
743
773
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentText AWS API Documentation
|
@@ -781,6 +811,11 @@ module Aws::Textract
|
|
781
811
|
# relationship with the value of the `StartDocumentAnalysis`
|
782
812
|
# `FeatureTypes` input parameter).
|
783
813
|
#
|
814
|
+
# * Queries. A QUERIES\_RESULT Block object contains the answer to the
|
815
|
+
# query, the alias associated and an ID that connect it to the query
|
816
|
+
# asked. This Block also contains a location and attached confidence
|
817
|
+
# score
|
818
|
+
#
|
784
819
|
# Selection elements such as check boxes and option buttons (radio
|
785
820
|
# buttons) can be detected in form data and in tables. A
|
786
821
|
# SELECTION\_ELEMENT `Block` object contains information about a
|
@@ -841,7 +876,7 @@ module Aws::Textract
|
|
841
876
|
# resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
|
842
877
|
# resp.next_token #=> String
|
843
878
|
# resp.blocks #=> Array
|
844
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE"
|
879
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
845
880
|
# resp.blocks[0].confidence #=> Float
|
846
881
|
# resp.blocks[0].text #=> String
|
847
882
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
@@ -858,13 +893,17 @@ module Aws::Textract
|
|
858
893
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
859
894
|
# resp.blocks[0].id #=> String
|
860
895
|
# resp.blocks[0].relationships #=> Array
|
861
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE"
|
896
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
862
897
|
# resp.blocks[0].relationships[0].ids #=> Array
|
863
898
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
864
899
|
# resp.blocks[0].entity_types #=> Array
|
865
900
|
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
866
901
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
867
902
|
# resp.blocks[0].page #=> Integer
|
903
|
+
# resp.blocks[0].query.text #=> String
|
904
|
+
# resp.blocks[0].query.alias #=> String
|
905
|
+
# resp.blocks[0].query.pages #=> Array
|
906
|
+
# resp.blocks[0].query.pages[0] #=> String
|
868
907
|
# resp.warnings #=> Array
|
869
908
|
# resp.warnings[0].error_code #=> String
|
870
909
|
# resp.warnings[0].pages #=> Array
|
@@ -959,7 +998,7 @@ module Aws::Textract
|
|
959
998
|
# resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
|
960
999
|
# resp.next_token #=> String
|
961
1000
|
# resp.blocks #=> Array
|
962
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE"
|
1001
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
963
1002
|
# resp.blocks[0].confidence #=> Float
|
964
1003
|
# resp.blocks[0].text #=> String
|
965
1004
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
@@ -976,13 +1015,17 @@ module Aws::Textract
|
|
976
1015
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
977
1016
|
# resp.blocks[0].id #=> String
|
978
1017
|
# resp.blocks[0].relationships #=> Array
|
979
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE"
|
1018
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
980
1019
|
# resp.blocks[0].relationships[0].ids #=> Array
|
981
1020
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
982
1021
|
# resp.blocks[0].entity_types #=> Array
|
983
1022
|
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
984
1023
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
985
1024
|
# resp.blocks[0].page #=> Integer
|
1025
|
+
# resp.blocks[0].query.text #=> String
|
1026
|
+
# resp.blocks[0].query.alias #=> String
|
1027
|
+
# resp.blocks[0].query.pages #=> Array
|
1028
|
+
# resp.blocks[0].query.pages[0] #=> String
|
986
1029
|
# resp.warnings #=> Array
|
987
1030
|
# resp.warnings[0].error_code #=> String
|
988
1031
|
# resp.warnings[0].pages #=> Array
|
@@ -1202,6 +1245,8 @@ module Aws::Textract
|
|
1202
1245
|
# customer bucket. When this parameter is not enabled, the result will
|
1203
1246
|
# be encrypted server side,using SSE-S3.
|
1204
1247
|
#
|
1248
|
+
# @option params [Types::QueriesConfig] :queries_config
|
1249
|
+
#
|
1205
1250
|
# @return [Types::StartDocumentAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1206
1251
|
#
|
1207
1252
|
# * {Types::StartDocumentAnalysisResponse#job_id #job_id} => String
|
@@ -1216,7 +1261,7 @@ module Aws::Textract
|
|
1216
1261
|
# version: "S3ObjectVersion",
|
1217
1262
|
# },
|
1218
1263
|
# },
|
1219
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
1264
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
1220
1265
|
# client_request_token: "ClientRequestToken",
|
1221
1266
|
# job_tag: "JobTag",
|
1222
1267
|
# notification_channel: {
|
@@ -1228,6 +1273,15 @@ module Aws::Textract
|
|
1228
1273
|
# s3_prefix: "S3ObjectName",
|
1229
1274
|
# },
|
1230
1275
|
# kms_key_id: "KMSKeyId",
|
1276
|
+
# queries_config: {
|
1277
|
+
# queries: [ # required
|
1278
|
+
# {
|
1279
|
+
# text: "QueryInput", # required
|
1280
|
+
# alias: "QueryInput",
|
1281
|
+
# pages: ["QueryPage"],
|
1282
|
+
# },
|
1283
|
+
# ],
|
1284
|
+
# },
|
1231
1285
|
# })
|
1232
1286
|
#
|
1233
1287
|
# @example Response structure
|
@@ -1460,7 +1514,7 @@ module Aws::Textract
|
|
1460
1514
|
params: params,
|
1461
1515
|
config: config)
|
1462
1516
|
context[:gem_name] = 'aws-sdk-textract'
|
1463
|
-
context[:gem_version] = '1.
|
1517
|
+
context[:gem_version] = '1.38.0'
|
1464
1518
|
Seahorse::Client::Request.new(handlers, context)
|
1465
1519
|
end
|
1466
1520
|
|
@@ -97,6 +97,12 @@ module Aws::Textract
|
|
97
97
|
Point = Shapes::StructureShape.new(name: 'Point')
|
98
98
|
Polygon = Shapes::ListShape.new(name: 'Polygon')
|
99
99
|
ProvisionedThroughputExceededException = Shapes::StructureShape.new(name: 'ProvisionedThroughputExceededException')
|
100
|
+
Queries = Shapes::ListShape.new(name: 'Queries')
|
101
|
+
QueriesConfig = Shapes::StructureShape.new(name: 'QueriesConfig')
|
102
|
+
Query = Shapes::StructureShape.new(name: 'Query')
|
103
|
+
QueryInput = Shapes::StringShape.new(name: 'QueryInput')
|
104
|
+
QueryPage = Shapes::StringShape.new(name: 'QueryPage')
|
105
|
+
QueryPages = Shapes::ListShape.new(name: 'QueryPages')
|
100
106
|
Relationship = Shapes::StructureShape.new(name: 'Relationship')
|
101
107
|
RelationshipList = Shapes::ListShape.new(name: 'RelationshipList')
|
102
108
|
RelationshipType = Shapes::StringShape.new(name: 'RelationshipType')
|
@@ -128,6 +134,7 @@ module Aws::Textract
|
|
128
134
|
AnalyzeDocumentRequest.add_member(:document, Shapes::ShapeRef.new(shape: Document, required: true, location_name: "Document"))
|
129
135
|
AnalyzeDocumentRequest.add_member(:feature_types, Shapes::ShapeRef.new(shape: FeatureTypes, required: true, location_name: "FeatureTypes"))
|
130
136
|
AnalyzeDocumentRequest.add_member(:human_loop_config, Shapes::ShapeRef.new(shape: HumanLoopConfig, location_name: "HumanLoopConfig"))
|
137
|
+
AnalyzeDocumentRequest.add_member(:queries_config, Shapes::ShapeRef.new(shape: QueriesConfig, location_name: "QueriesConfig"))
|
131
138
|
AnalyzeDocumentRequest.struct_class = Types::AnalyzeDocumentRequest
|
132
139
|
|
133
140
|
AnalyzeDocumentResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
|
@@ -172,6 +179,7 @@ module Aws::Textract
|
|
172
179
|
Block.add_member(:entity_types, Shapes::ShapeRef.new(shape: EntityTypes, location_name: "EntityTypes"))
|
173
180
|
Block.add_member(:selection_status, Shapes::ShapeRef.new(shape: SelectionStatus, location_name: "SelectionStatus"))
|
174
181
|
Block.add_member(:page, Shapes::ShapeRef.new(shape: UInteger, location_name: "Page"))
|
182
|
+
Block.add_member(:query, Shapes::ShapeRef.new(shape: Query, location_name: "Query"))
|
175
183
|
Block.struct_class = Types::Block
|
176
184
|
|
177
185
|
BlockList.member = Shapes::ShapeRef.new(shape: Block)
|
@@ -361,6 +369,18 @@ module Aws::Textract
|
|
361
369
|
|
362
370
|
ProvisionedThroughputExceededException.struct_class = Types::ProvisionedThroughputExceededException
|
363
371
|
|
372
|
+
Queries.member = Shapes::ShapeRef.new(shape: Query)
|
373
|
+
|
374
|
+
QueriesConfig.add_member(:queries, Shapes::ShapeRef.new(shape: Queries, required: true, location_name: "Queries"))
|
375
|
+
QueriesConfig.struct_class = Types::QueriesConfig
|
376
|
+
|
377
|
+
Query.add_member(:text, Shapes::ShapeRef.new(shape: QueryInput, required: true, location_name: "Text"))
|
378
|
+
Query.add_member(:alias, Shapes::ShapeRef.new(shape: QueryInput, location_name: "Alias"))
|
379
|
+
Query.add_member(:pages, Shapes::ShapeRef.new(shape: QueryPages, location_name: "Pages"))
|
380
|
+
Query.struct_class = Types::Query
|
381
|
+
|
382
|
+
QueryPages.member = Shapes::ShapeRef.new(shape: QueryPage)
|
383
|
+
|
364
384
|
Relationship.add_member(:type, Shapes::ShapeRef.new(shape: RelationshipType, location_name: "Type"))
|
365
385
|
Relationship.add_member(:ids, Shapes::ShapeRef.new(shape: IdList, location_name: "Ids"))
|
366
386
|
Relationship.struct_class = Types::Relationship
|
@@ -379,6 +399,7 @@ module Aws::Textract
|
|
379
399
|
StartDocumentAnalysisRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
|
380
400
|
StartDocumentAnalysisRequest.add_member(:output_config, Shapes::ShapeRef.new(shape: OutputConfig, location_name: "OutputConfig"))
|
381
401
|
StartDocumentAnalysisRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KMSKeyId, location_name: "KMSKeyId"))
|
402
|
+
StartDocumentAnalysisRequest.add_member(:queries_config, Shapes::ShapeRef.new(shape: QueriesConfig, location_name: "QueriesConfig"))
|
382
403
|
StartDocumentAnalysisRequest.struct_class = Types::StartDocumentAnalysisRequest
|
383
404
|
|
384
405
|
StartDocumentAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
@@ -29,7 +29,7 @@ module Aws::Textract
|
|
29
29
|
# version: "S3ObjectVersion",
|
30
30
|
# },
|
31
31
|
# },
|
32
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
32
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
33
33
|
# human_loop_config: {
|
34
34
|
# human_loop_name: "HumanLoopName", # required
|
35
35
|
# flow_definition_arn: "FlowDefinitionArn", # required
|
@@ -37,13 +37,22 @@ module Aws::Textract
|
|
37
37
|
# content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
|
38
38
|
# },
|
39
39
|
# },
|
40
|
+
# queries_config: {
|
41
|
+
# queries: [ # required
|
42
|
+
# {
|
43
|
+
# text: "QueryInput", # required
|
44
|
+
# alias: "QueryInput",
|
45
|
+
# pages: ["QueryPage"],
|
46
|
+
# },
|
47
|
+
# ],
|
48
|
+
# },
|
40
49
|
# }
|
41
50
|
#
|
42
51
|
# @!attribute [rw] document
|
43
52
|
# The input document as base64-encoded bytes or an Amazon S3 object.
|
44
53
|
# If you use the AWS CLI to call Amazon Textract operations, you
|
45
|
-
# can't pass image bytes. The document must be an image in JPEG
|
46
|
-
#
|
54
|
+
# can't pass image bytes. The document must be an image in JPEG, PNG,
|
55
|
+
# PDF, or TIFF format.
|
47
56
|
#
|
48
57
|
# If you're using an AWS SDK to call Amazon Textract, you might not
|
49
58
|
# need to base64-encode image bytes that are passed using the `Bytes`
|
@@ -65,12 +74,18 @@ module Aws::Textract
|
|
65
74
|
# analyzing documents.
|
66
75
|
# @return [Types::HumanLoopConfig]
|
67
76
|
#
|
77
|
+
# @!attribute [rw] queries_config
|
78
|
+
# Contains Queries and the alias for those Queries, as determined by
|
79
|
+
# the input.
|
80
|
+
# @return [Types::QueriesConfig]
|
81
|
+
#
|
68
82
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocumentRequest AWS API Documentation
|
69
83
|
#
|
70
84
|
class AnalyzeDocumentRequest < Struct.new(
|
71
85
|
:document,
|
72
86
|
:feature_types,
|
73
|
-
:human_loop_config
|
87
|
+
:human_loop_config,
|
88
|
+
:queries_config)
|
74
89
|
SENSITIVE = []
|
75
90
|
include Aws::Structure
|
76
91
|
end
|
@@ -315,6 +330,14 @@ module Aws::Textract
|
|
315
330
|
# button (radio button) or a check box that's detected on a
|
316
331
|
# document page. Use the value of `SelectionStatus` to determine the
|
317
332
|
# status of the selection element.
|
333
|
+
#
|
334
|
+
# * *QUERY* - A question asked during the call of AnalyzeDocument.
|
335
|
+
# Contains an alias and an ID that attachs it to its answer.
|
336
|
+
#
|
337
|
+
# * *QUERY\_RESULT* - A response to a question asked during the call
|
338
|
+
# of analyze document. Comes with an alias and ID for ease of
|
339
|
+
# locating in a response. Also contains location and confidence
|
340
|
+
# score.
|
318
341
|
# @return [String]
|
319
342
|
#
|
320
343
|
# @!attribute [rw] confidence
|
@@ -408,6 +431,9 @@ module Aws::Textract
|
|
408
431
|
# document.
|
409
432
|
# @return [Integer]
|
410
433
|
#
|
434
|
+
# @!attribute [rw] query
|
435
|
+
# @return [Types::Query]
|
436
|
+
#
|
411
437
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Block AWS API Documentation
|
412
438
|
#
|
413
439
|
class Block < Struct.new(
|
@@ -424,7 +450,8 @@ module Aws::Textract
|
|
424
450
|
:relationships,
|
425
451
|
:entity_types,
|
426
452
|
:selection_status,
|
427
|
-
:page
|
453
|
+
:page,
|
454
|
+
:query)
|
428
455
|
SENSITIVE = []
|
429
456
|
include Aws::Structure
|
430
457
|
end
|
@@ -1427,6 +1454,80 @@ module Aws::Textract
|
|
1427
1454
|
#
|
1428
1455
|
class ProvisionedThroughputExceededException < Aws::EmptyStructure; end
|
1429
1456
|
|
1457
|
+
# @note When making an API call, you may pass QueriesConfig
|
1458
|
+
# data as a hash:
|
1459
|
+
#
|
1460
|
+
# {
|
1461
|
+
# queries: [ # required
|
1462
|
+
# {
|
1463
|
+
# text: "QueryInput", # required
|
1464
|
+
# alias: "QueryInput",
|
1465
|
+
# pages: ["QueryPage"],
|
1466
|
+
# },
|
1467
|
+
# ],
|
1468
|
+
# }
|
1469
|
+
#
|
1470
|
+
# @!attribute [rw] queries
|
1471
|
+
# @return [Array<Types::Query>]
|
1472
|
+
#
|
1473
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/QueriesConfig AWS API Documentation
|
1474
|
+
#
|
1475
|
+
class QueriesConfig < Struct.new(
|
1476
|
+
:queries)
|
1477
|
+
SENSITIVE = []
|
1478
|
+
include Aws::Structure
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
# Each query contains the question you want to ask in the Text and the
|
1482
|
+
# alias you want to associate.
|
1483
|
+
#
|
1484
|
+
# @note When making an API call, you may pass Query
|
1485
|
+
# data as a hash:
|
1486
|
+
#
|
1487
|
+
# {
|
1488
|
+
# text: "QueryInput", # required
|
1489
|
+
# alias: "QueryInput",
|
1490
|
+
# pages: ["QueryPage"],
|
1491
|
+
# }
|
1492
|
+
#
|
1493
|
+
# @!attribute [rw] text
|
1494
|
+
# Question that Amazon Textract will apply to the document. An example
|
1495
|
+
# would be "What is the customer's SSN?"
|
1496
|
+
# @return [String]
|
1497
|
+
#
|
1498
|
+
# @!attribute [rw] alias
|
1499
|
+
# Alias attached to the query, for ease of location.
|
1500
|
+
# @return [String]
|
1501
|
+
#
|
1502
|
+
# @!attribute [rw] pages
|
1503
|
+
# List of pages associated with the query. The following is a list of
|
1504
|
+
# rules for using this parameter.
|
1505
|
+
#
|
1506
|
+
# * If a page is not specified, it is set to `["1"]` by default.
|
1507
|
+
#
|
1508
|
+
# * The following characters are allowed in the parameter's string:
|
1509
|
+
# `0 1 2 3 4 5 6 7 8 9 - *`. No whitespace is allowed.
|
1510
|
+
#
|
1511
|
+
# * When using `*` to indicate all pages, it must be the only element
|
1512
|
+
# in the string.
|
1513
|
+
#
|
1514
|
+
# * You can use page intervals, such as `[“1-3”, “1-1”, “4-*”]`. Where
|
1515
|
+
# `*` indicates last page of document.
|
1516
|
+
#
|
1517
|
+
# * Specified pages must be greater than 0 and less than or equal to
|
1518
|
+
# the number of pages in the document.
|
1519
|
+
# @return [Array<String>]
|
1520
|
+
#
|
1521
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Query AWS API Documentation
|
1522
|
+
#
|
1523
|
+
class Query < Struct.new(
|
1524
|
+
:text,
|
1525
|
+
:alias,
|
1526
|
+
:pages)
|
1527
|
+
SENSITIVE = []
|
1528
|
+
include Aws::Structure
|
1529
|
+
end
|
1530
|
+
|
1430
1531
|
# Information about how blocks are related to each other. A `Block`
|
1431
1532
|
# object contains 0 or more `Relation` objects in a list,
|
1432
1533
|
# `Relationships`. For more information, see Block.
|
@@ -1512,7 +1613,7 @@ module Aws::Textract
|
|
1512
1613
|
# version: "S3ObjectVersion",
|
1513
1614
|
# },
|
1514
1615
|
# },
|
1515
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
1616
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
1516
1617
|
# client_request_token: "ClientRequestToken",
|
1517
1618
|
# job_tag: "JobTag",
|
1518
1619
|
# notification_channel: {
|
@@ -1524,6 +1625,15 @@ module Aws::Textract
|
|
1524
1625
|
# s3_prefix: "S3ObjectName",
|
1525
1626
|
# },
|
1526
1627
|
# kms_key_id: "KMSKeyId",
|
1628
|
+
# queries_config: {
|
1629
|
+
# queries: [ # required
|
1630
|
+
# {
|
1631
|
+
# text: "QueryInput", # required
|
1632
|
+
# alias: "QueryInput",
|
1633
|
+
# pages: ["QueryPage"],
|
1634
|
+
# },
|
1635
|
+
# ],
|
1636
|
+
# },
|
1527
1637
|
# }
|
1528
1638
|
#
|
1529
1639
|
# @!attribute [rw] document_location
|
@@ -1579,6 +1689,9 @@ module Aws::Textract
|
|
1579
1689
|
# will be encrypted server side,using SSE-S3.
|
1580
1690
|
# @return [String]
|
1581
1691
|
#
|
1692
|
+
# @!attribute [rw] queries_config
|
1693
|
+
# @return [Types::QueriesConfig]
|
1694
|
+
#
|
1582
1695
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysisRequest AWS API Documentation
|
1583
1696
|
#
|
1584
1697
|
class StartDocumentAnalysisRequest < Struct.new(
|
@@ -1588,7 +1701,8 @@ module Aws::Textract
|
|
1588
1701
|
:job_tag,
|
1589
1702
|
:notification_channel,
|
1590
1703
|
:output_config,
|
1591
|
-
:kms_key_id
|
1704
|
+
:kms_key_id,
|
1705
|
+
:queries_config)
|
1592
1706
|
SENSITIVE = []
|
1593
1707
|
include Aws::Structure
|
1594
1708
|
end
|
@@ -1804,8 +1918,7 @@ module Aws::Textract
|
|
1804
1918
|
class ThrottlingException < Aws::EmptyStructure; end
|
1805
1919
|
|
1806
1920
|
# The format of the input document isn't supported. Documents for
|
1807
|
-
#
|
1808
|
-
# for asynchronous operations can be in PDF format.
|
1921
|
+
# operations can be in PNG, JPEG, PDF, or TIFF format.
|
1809
1922
|
#
|
1810
1923
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/UnsupportedDocumentException AWS API Documentation
|
1811
1924
|
#
|
data/lib/aws-sdk-textract.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-textract
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.38.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|