@aws-sdk/client-textract 3.199.0 → 3.201.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.
- package/CHANGELOG.md +23 -0
- package/dist-cjs/endpoint/EndpointParameters.js +2 -3
- package/dist-cjs/models/models_0.js +10 -2
- package/dist-cjs/protocols/Aws_json1_1.js +47 -11
- package/dist-cjs/runtimeConfig.browser.js +16 -16
- package/dist-cjs/runtimeConfig.js +20 -19
- package/dist-cjs/runtimeConfig.native.js +1 -2
- package/dist-cjs/runtimeConfig.shared.js +8 -11
- package/dist-es/models/models_0.js +6 -0
- package/dist-es/protocols/Aws_json1_1.js +40 -0
- package/dist-types/Textract.d.ts +80 -51
- package/dist-types/commands/AnalyzeDocumentCommand.d.ts +23 -15
- package/dist-types/commands/AnalyzeExpenseCommand.d.ts +8 -5
- package/dist-types/commands/AnalyzeIDCommand.d.ts +4 -4
- package/dist-types/commands/DetectDocumentTextCommand.d.ts +3 -2
- package/dist-types/commands/GetDocumentAnalysisCommand.d.ts +42 -25
- package/dist-types/models/models_0.d.ts +127 -28
- package/dist-types/ts3.4/models/models_0.d.ts +18 -0
- package/package.json +33 -33
package/dist-types/Textract.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { TextractClient } from "./TextractClient";
|
|
|
17
17
|
*/
|
|
18
18
|
export declare class Textract extends TextractClient {
|
|
19
19
|
/**
|
|
20
|
-
* <p>Analyzes an input document for relationships between detected items.
|
|
20
|
+
* <p>Analyzes an input document for relationships between detected items. </p>
|
|
21
21
|
* <p>The types of information returned are as follows: </p>
|
|
22
22
|
* <ul>
|
|
23
23
|
* <li>
|
|
@@ -28,49 +28,60 @@ export declare class Textract extends TextractClient {
|
|
|
28
28
|
* the value.</p>
|
|
29
29
|
* </li>
|
|
30
30
|
* <li>
|
|
31
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
32
|
-
* <code>Block</code> object is returned for each cell in
|
|
31
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
32
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
33
|
+
* a table.</p>
|
|
33
34
|
* </li>
|
|
34
35
|
* <li>
|
|
35
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
36
|
-
*
|
|
37
|
-
* relationship with the value
|
|
36
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
37
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
38
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
39
|
+
* of <code>FeatureTypes</code>). </p>
|
|
38
40
|
* </li>
|
|
39
41
|
* <li>
|
|
40
|
-
* <p>
|
|
41
|
-
*
|
|
42
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
43
|
+
* associated Query results block object.</p>
|
|
44
|
+
* </li>
|
|
45
|
+
* <li>
|
|
46
|
+
* <p>Query Result. A QUERY_RESULT Block object contains the answer to the query and an
|
|
47
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
48
|
+
* score.</p>
|
|
42
49
|
* </li>
|
|
43
50
|
* </ul>
|
|
44
51
|
*
|
|
45
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
46
|
-
* A SELECTION_ELEMENT <code>Block</code> object contains
|
|
47
|
-
* including the selection status.</p>
|
|
52
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
53
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
54
|
+
* information about a selection element, including the selection status.</p>
|
|
48
55
|
*
|
|
49
|
-
* <p>You can choose which type of analysis to perform by specifying the
|
|
50
|
-
*
|
|
56
|
+
* <p>You can choose which type of analysis to perform by specifying the
|
|
57
|
+
* <code>FeatureTypes</code> list. </p>
|
|
51
58
|
* <p>The output is returned in a list of <code>Block</code> objects.</p>
|
|
52
59
|
* <p>
|
|
53
60
|
* <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
|
|
54
|
-
*
|
|
55
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
61
|
+
* asynchronously, use <a>StartDocumentAnalysis</a>.</p>
|
|
62
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
63
|
+
* Analysis</a>.</p>
|
|
56
64
|
*/
|
|
57
65
|
analyzeDocument(args: AnalyzeDocumentCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeDocumentCommandOutput>;
|
|
58
66
|
analyzeDocument(args: AnalyzeDocumentCommandInput, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
59
67
|
analyzeDocument(args: AnalyzeDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
60
68
|
/**
|
|
61
69
|
* <p>
|
|
62
|
-
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
63
|
-
*
|
|
70
|
+
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
71
|
+
* related relationships between text.</p>
|
|
72
|
+
* <p>Information is returned as <code>ExpenseDocuments</code> and seperated as
|
|
73
|
+
* follows:</p>
|
|
64
74
|
* <ul>
|
|
65
75
|
* <li>
|
|
66
76
|
* <p>
|
|
67
77
|
* <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
|
|
68
|
-
*
|
|
78
|
+
* store information about the lines of text, such as an item purchased and its price on
|
|
79
|
+
* a receipt.</p>
|
|
69
80
|
* </li>
|
|
70
81
|
* <li>
|
|
71
82
|
* <p>
|
|
72
|
-
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
73
|
-
*
|
|
83
|
+
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
84
|
+
* header information or the vendors name.</p>
|
|
74
85
|
* </li>
|
|
75
86
|
* </ul>
|
|
76
87
|
*/
|
|
@@ -78,18 +89,19 @@ export declare class Textract extends TextractClient {
|
|
|
78
89
|
analyzeExpense(args: AnalyzeExpenseCommandInput, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
79
90
|
analyzeExpense(args: AnalyzeExpenseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
80
91
|
/**
|
|
81
|
-
* <p>Analyzes identity documents for relevant information. This information is extracted
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
92
|
+
* <p>Analyzes identity documents for relevant information. This information is extracted and
|
|
93
|
+
* returned as <code>IdentityDocumentFields</code>, which records both the normalized field
|
|
94
|
+
* and value of the extracted text.Unlike other Amazon Textract operations,
|
|
95
|
+
* <code>AnalyzeID</code> doesn't return any Geometry data.</p>
|
|
85
96
|
*/
|
|
86
97
|
analyzeID(args: AnalyzeIDCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeIDCommandOutput>;
|
|
87
98
|
analyzeID(args: AnalyzeIDCommandInput, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
88
99
|
analyzeID(args: AnalyzeIDCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
89
100
|
/**
|
|
90
101
|
* <p>Detects text in the input document. Amazon Textract can detect lines of text and the
|
|
91
|
-
* words that make up a line of text. The input document must be
|
|
92
|
-
*
|
|
102
|
+
* words that make up a line of text. The input document must be in one of the following image
|
|
103
|
+
* formats: JPEG, PNG, PDF, or TIFF. <code>DetectDocumentText</code> returns the detected
|
|
104
|
+
* text in an array of <a>Block</a> objects. </p>
|
|
93
105
|
* <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
|
|
94
106
|
* is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
|
|
95
107
|
* a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
|
|
@@ -103,44 +115,60 @@ export declare class Textract extends TextractClient {
|
|
|
103
115
|
detectDocumentText(args: DetectDocumentTextCommandInput, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
104
116
|
detectDocumentText(args: DetectDocumentTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
105
117
|
/**
|
|
106
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
118
|
+
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
119
|
+
* document.</p>
|
|
120
|
+
* <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>,
|
|
121
|
+
* which returns a job identifier (<code>JobId</code>). When the text analysis operation
|
|
122
|
+
* finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic
|
|
123
|
+
* that's registered in the initial call to <code>StartDocumentAnalysis</code>. To get the
|
|
124
|
+
* results of the text-detection operation, first check that the status value published to the
|
|
125
|
+
* Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <code>GetDocumentAnalysis</code>, and
|
|
126
|
+
* pass the job identifier (<code>JobId</code>) from the initial call to
|
|
127
|
+
* <code>StartDocumentAnalysis</code>.</p>
|
|
114
128
|
* <p>
|
|
115
|
-
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
116
|
-
* types of information are returned: </p>
|
|
129
|
+
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
130
|
+
* The following types of information are returned: </p>
|
|
117
131
|
* <ul>
|
|
118
132
|
* <li>
|
|
119
133
|
* <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
134
|
+
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
135
|
+
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
136
|
+
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
137
|
+
* the value.</p>
|
|
124
138
|
* </li>
|
|
125
139
|
* <li>
|
|
126
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
127
|
-
*
|
|
140
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
141
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
142
|
+
* a table.</p>
|
|
128
143
|
* </li>
|
|
129
144
|
* <li>
|
|
130
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
131
|
-
*
|
|
132
|
-
*
|
|
145
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
146
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
147
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
148
|
+
* of the <code>StartDocumentAnalysis</code>
|
|
133
149
|
* <code>FeatureTypes</code> input parameter). </p>
|
|
134
150
|
* </li>
|
|
135
151
|
* <li>
|
|
136
|
-
* <p>
|
|
137
|
-
*
|
|
152
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
153
|
+
* associated Query results block object.</p>
|
|
154
|
+
* </li>
|
|
155
|
+
* <li>
|
|
156
|
+
* <p>Query Results. A QUERY_RESULT Block object contains the answer to the query and an
|
|
157
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
158
|
+
* score.</p>
|
|
138
159
|
* </li>
|
|
139
160
|
* </ul>
|
|
140
161
|
*
|
|
141
|
-
* <
|
|
142
|
-
*
|
|
143
|
-
*
|
|
162
|
+
* <note>
|
|
163
|
+
* <p>While processing a document with queries, look out for
|
|
164
|
+
* <code>INVALID_REQUEST_PARAMETERS</code> output. This indicates that either the per
|
|
165
|
+
* page query limit has been exceeded or that the operation is trying to query a page in
|
|
166
|
+
* the document which doesn’t exist. </p>
|
|
167
|
+
* </note>
|
|
168
|
+
*
|
|
169
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
170
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
171
|
+
* information about a selection element, including the selection status.</p>
|
|
144
172
|
*
|
|
145
173
|
*
|
|
146
174
|
* <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
|
|
@@ -150,7 +178,8 @@ export declare class Textract extends TextractClient {
|
|
|
150
178
|
* <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
|
|
151
179
|
* parameter with the token value that's returned from the previous call to
|
|
152
180
|
* <code>GetDocumentAnalysis</code>.</p>
|
|
153
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
181
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
182
|
+
* Analysis</a>.</p>
|
|
154
183
|
*/
|
|
155
184
|
getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentAnalysisCommandOutput>;
|
|
156
185
|
getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void): void;
|
|
@@ -8,7 +8,7 @@ export interface AnalyzeDocumentCommandInput extends AnalyzeDocumentRequest {
|
|
|
8
8
|
export interface AnalyzeDocumentCommandOutput extends AnalyzeDocumentResponse, __MetadataBearer {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* <p>Analyzes an input document for relationships between detected items.
|
|
11
|
+
* <p>Analyzes an input document for relationships between detected items. </p>
|
|
12
12
|
* <p>The types of information returned are as follows: </p>
|
|
13
13
|
* <ul>
|
|
14
14
|
* <li>
|
|
@@ -19,31 +19,39 @@ export interface AnalyzeDocumentCommandOutput extends AnalyzeDocumentResponse, _
|
|
|
19
19
|
* the value.</p>
|
|
20
20
|
* </li>
|
|
21
21
|
* <li>
|
|
22
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
23
|
-
* <code>Block</code> object is returned for each cell in
|
|
22
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
23
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
24
|
+
* a table.</p>
|
|
24
25
|
* </li>
|
|
25
26
|
* <li>
|
|
26
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
27
|
-
*
|
|
28
|
-
* relationship with the value
|
|
27
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
28
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
29
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
30
|
+
* of <code>FeatureTypes</code>). </p>
|
|
29
31
|
* </li>
|
|
30
32
|
* <li>
|
|
31
|
-
* <p>
|
|
32
|
-
*
|
|
33
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
34
|
+
* associated Query results block object.</p>
|
|
35
|
+
* </li>
|
|
36
|
+
* <li>
|
|
37
|
+
* <p>Query Result. A QUERY_RESULT Block object contains the answer to the query and an
|
|
38
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
39
|
+
* score.</p>
|
|
33
40
|
* </li>
|
|
34
41
|
* </ul>
|
|
35
42
|
*
|
|
36
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
37
|
-
* A SELECTION_ELEMENT <code>Block</code> object contains
|
|
38
|
-
* including the selection status.</p>
|
|
43
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
44
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
45
|
+
* information about a selection element, including the selection status.</p>
|
|
39
46
|
*
|
|
40
|
-
* <p>You can choose which type of analysis to perform by specifying the
|
|
41
|
-
*
|
|
47
|
+
* <p>You can choose which type of analysis to perform by specifying the
|
|
48
|
+
* <code>FeatureTypes</code> list. </p>
|
|
42
49
|
* <p>The output is returned in a list of <code>Block</code> objects.</p>
|
|
43
50
|
* <p>
|
|
44
51
|
* <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
|
|
45
|
-
*
|
|
46
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
52
|
+
* asynchronously, use <a>StartDocumentAnalysis</a>.</p>
|
|
53
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
54
|
+
* Analysis</a>.</p>
|
|
47
55
|
* @example
|
|
48
56
|
* Use a bare-bones client and the command you need to make an API call.
|
|
49
57
|
* ```javascript
|
|
@@ -9,18 +9,21 @@ export interface AnalyzeExpenseCommandOutput extends AnalyzeExpenseResponse, __M
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* <p>
|
|
12
|
-
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
13
|
-
*
|
|
12
|
+
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
13
|
+
* related relationships between text.</p>
|
|
14
|
+
* <p>Information is returned as <code>ExpenseDocuments</code> and seperated as
|
|
15
|
+
* follows:</p>
|
|
14
16
|
* <ul>
|
|
15
17
|
* <li>
|
|
16
18
|
* <p>
|
|
17
19
|
* <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
|
|
18
|
-
*
|
|
20
|
+
* store information about the lines of text, such as an item purchased and its price on
|
|
21
|
+
* a receipt.</p>
|
|
19
22
|
* </li>
|
|
20
23
|
* <li>
|
|
21
24
|
* <p>
|
|
22
|
-
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
23
|
-
*
|
|
25
|
+
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
26
|
+
* header information or the vendors name.</p>
|
|
24
27
|
* </li>
|
|
25
28
|
* </ul>
|
|
26
29
|
* @example
|
|
@@ -8,10 +8,10 @@ export interface AnalyzeIDCommandInput extends AnalyzeIDRequest {
|
|
|
8
8
|
export interface AnalyzeIDCommandOutput extends AnalyzeIDResponse, __MetadataBearer {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* <p>Analyzes identity documents for relevant information. This information is extracted
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* <p>Analyzes identity documents for relevant information. This information is extracted and
|
|
12
|
+
* returned as <code>IdentityDocumentFields</code>, which records both the normalized field
|
|
13
|
+
* and value of the extracted text.Unlike other Amazon Textract operations,
|
|
14
|
+
* <code>AnalyzeID</code> doesn't return any Geometry data.</p>
|
|
15
15
|
* @example
|
|
16
16
|
* Use a bare-bones client and the command you need to make an API call.
|
|
17
17
|
* ```javascript
|
|
@@ -9,8 +9,9 @@ export interface DetectDocumentTextCommandOutput extends DetectDocumentTextRespo
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* <p>Detects text in the input document. Amazon Textract can detect lines of text and the
|
|
12
|
-
* words that make up a line of text. The input document must be
|
|
13
|
-
*
|
|
12
|
+
* words that make up a line of text. The input document must be in one of the following image
|
|
13
|
+
* formats: JPEG, PNG, PDF, or TIFF. <code>DetectDocumentText</code> returns the detected
|
|
14
|
+
* text in an array of <a>Block</a> objects. </p>
|
|
14
15
|
* <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
|
|
15
16
|
* is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
|
|
16
17
|
* a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
|
|
@@ -8,44 +8,60 @@ export interface GetDocumentAnalysisCommandInput extends GetDocumentAnalysisRequ
|
|
|
8
8
|
export interface GetDocumentAnalysisCommandOutput extends GetDocumentAnalysisResponse, __MetadataBearer {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
11
|
+
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
12
|
+
* document.</p>
|
|
13
|
+
* <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>,
|
|
14
|
+
* which returns a job identifier (<code>JobId</code>). When the text analysis operation
|
|
15
|
+
* finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic
|
|
16
|
+
* that's registered in the initial call to <code>StartDocumentAnalysis</code>. To get the
|
|
17
|
+
* results of the text-detection operation, first check that the status value published to the
|
|
18
|
+
* Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <code>GetDocumentAnalysis</code>, and
|
|
19
|
+
* pass the job identifier (<code>JobId</code>) from the initial call to
|
|
20
|
+
* <code>StartDocumentAnalysis</code>.</p>
|
|
19
21
|
* <p>
|
|
20
|
-
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
21
|
-
* types of information are returned: </p>
|
|
22
|
+
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
23
|
+
* The following types of information are returned: </p>
|
|
22
24
|
* <ul>
|
|
23
25
|
* <li>
|
|
24
26
|
* <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
28
|
+
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
29
|
+
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
30
|
+
* the value.</p>
|
|
29
31
|
* </li>
|
|
30
32
|
* <li>
|
|
31
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
32
|
-
*
|
|
33
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
34
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
35
|
+
* a table.</p>
|
|
33
36
|
* </li>
|
|
34
37
|
* <li>
|
|
35
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
39
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
40
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
41
|
+
* of the <code>StartDocumentAnalysis</code>
|
|
38
42
|
* <code>FeatureTypes</code> input parameter). </p>
|
|
39
43
|
* </li>
|
|
40
44
|
* <li>
|
|
41
|
-
* <p>
|
|
42
|
-
*
|
|
45
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
46
|
+
* associated Query results block object.</p>
|
|
47
|
+
* </li>
|
|
48
|
+
* <li>
|
|
49
|
+
* <p>Query Results. A QUERY_RESULT Block object contains the answer to the query and an
|
|
50
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
51
|
+
* score.</p>
|
|
43
52
|
* </li>
|
|
44
53
|
* </ul>
|
|
45
54
|
*
|
|
46
|
-
* <
|
|
47
|
-
*
|
|
48
|
-
*
|
|
55
|
+
* <note>
|
|
56
|
+
* <p>While processing a document with queries, look out for
|
|
57
|
+
* <code>INVALID_REQUEST_PARAMETERS</code> output. This indicates that either the per
|
|
58
|
+
* page query limit has been exceeded or that the operation is trying to query a page in
|
|
59
|
+
* the document which doesn’t exist. </p>
|
|
60
|
+
* </note>
|
|
61
|
+
*
|
|
62
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
63
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
64
|
+
* information about a selection element, including the selection status.</p>
|
|
49
65
|
*
|
|
50
66
|
*
|
|
51
67
|
* <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
|
|
@@ -55,7 +71,8 @@ export interface GetDocumentAnalysisCommandOutput extends GetDocumentAnalysisRes
|
|
|
55
71
|
* <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
|
|
56
72
|
* parameter with the token value that's returned from the previous call to
|
|
57
73
|
* <code>GetDocumentAnalysis</code>.</p>
|
|
58
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
74
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
75
|
+
* Analysis</a>.</p>
|
|
59
76
|
* @example
|
|
60
77
|
* Use a bare-bones client and the command you need to make an API call.
|
|
61
78
|
* ```javascript
|