Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Analyzes an input document for relationships between detected items.
The types of information returned are as follows:
- Form data (key-value pairs). The related information is returned in
two Block objects, each of type
KEY_VALUE_SET
: a KEYBlock
object and a VALUEBlock
object. For example, /Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina/ is the value. - Table and table cell data. A TABLE
Block
object contains information about a detected table. A CELLBlock
object is returned for each cell in a table. - Lines and words of text. A LINE
Block
object contains one or more WORDBlock
objects. All lines and words that are detected in the document are returned (including text that doesn't have a relationship with the value ofFeatureTypes
).
Selection elements such as check boxes and option buttons (radio
buttons) can be detected in form data and in tables. A SELECTION_ELEMENT
Block
object contains information about a selection element, including
the selection status.
You can choose which type of analysis to perform by specifying the
FeatureTypes
list.
The output is returned in a list of Block
objects.
AnalyzeDocument
is a synchronous operation. To analyze documents
asynchronously, use StartDocumentAnalysis.
For more information, see Document Text Analysis.
Synopsis
- data AnalyzeDocument = AnalyzeDocument' {}
- newAnalyzeDocument :: Document -> AnalyzeDocument
- analyzeDocument_humanLoopConfig :: Lens' AnalyzeDocument (Maybe HumanLoopConfig)
- analyzeDocument_document :: Lens' AnalyzeDocument Document
- analyzeDocument_featureTypes :: Lens' AnalyzeDocument [FeatureType]
- data AnalyzeDocumentResponse = AnalyzeDocumentResponse' {}
- newAnalyzeDocumentResponse :: Int -> AnalyzeDocumentResponse
- analyzeDocumentResponse_documentMetadata :: Lens' AnalyzeDocumentResponse (Maybe DocumentMetadata)
- analyzeDocumentResponse_blocks :: Lens' AnalyzeDocumentResponse (Maybe [Block])
- analyzeDocumentResponse_humanLoopActivationOutput :: Lens' AnalyzeDocumentResponse (Maybe HumanLoopActivationOutput)
- analyzeDocumentResponse_analyzeDocumentModelVersion :: Lens' AnalyzeDocumentResponse (Maybe Text)
- analyzeDocumentResponse_httpStatus :: Lens' AnalyzeDocumentResponse Int
Creating a Request
data AnalyzeDocument Source #
See: newAnalyzeDocument
smart constructor.
AnalyzeDocument' | |
|
Instances
Create a value of AnalyzeDocument
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:humanLoopConfig:AnalyzeDocument'
, analyzeDocument_humanLoopConfig
- Sets the configuration for the human in the loop workflow for analyzing
documents.
$sel:document:AnalyzeDocument'
, analyzeDocument_document
- The input document as base64-encoded bytes or an Amazon S3 object. If
you use the AWS CLI to call Amazon Textract operations, you can't pass
image bytes. The document must be an image in JPEG or PNG format.
If you're using an AWS SDK to call Amazon Textract, you might not need
to base64-encode image bytes that are passed using the Bytes
field.
$sel:featureTypes:AnalyzeDocument'
, analyzeDocument_featureTypes
- A list of the types of analysis to perform. Add TABLES to the list to
return information about the tables that are detected in the input
document. Add FORMS to return detected form data. To perform both types
of analysis, add TABLES and FORMS to FeatureTypes
. All lines and words
detected in the document are included in the response (including text
that isn't related to the value of FeatureTypes
).
Request Lenses
analyzeDocument_humanLoopConfig :: Lens' AnalyzeDocument (Maybe HumanLoopConfig) Source #
Sets the configuration for the human in the loop workflow for analyzing documents.
analyzeDocument_document :: Lens' AnalyzeDocument Document Source #
The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an image in JPEG or PNG format.
If you're using an AWS SDK to call Amazon Textract, you might not need
to base64-encode image bytes that are passed using the Bytes
field.
analyzeDocument_featureTypes :: Lens' AnalyzeDocument [FeatureType] Source #
A list of the types of analysis to perform. Add TABLES to the list to
return information about the tables that are detected in the input
document. Add FORMS to return detected form data. To perform both types
of analysis, add TABLES and FORMS to FeatureTypes
. All lines and words
detected in the document are included in the response (including text
that isn't related to the value of FeatureTypes
).
Destructuring the Response
data AnalyzeDocumentResponse Source #
See: newAnalyzeDocumentResponse
smart constructor.
AnalyzeDocumentResponse' | |
|
Instances
newAnalyzeDocumentResponse Source #
Create a value of AnalyzeDocumentResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:documentMetadata:AnalyzeDocumentResponse'
, analyzeDocumentResponse_documentMetadata
- Metadata about the analyzed document. An example is the number of pages.
$sel:blocks:AnalyzeDocumentResponse'
, analyzeDocumentResponse_blocks
- The items that are detected and analyzed by AnalyzeDocument
.
$sel:humanLoopActivationOutput:AnalyzeDocumentResponse'
, analyzeDocumentResponse_humanLoopActivationOutput
- Shows the results of the human in the loop evaluation.
$sel:analyzeDocumentModelVersion:AnalyzeDocumentResponse'
, analyzeDocumentResponse_analyzeDocumentModelVersion
- The version of the model used to analyze the document.
$sel:httpStatus:AnalyzeDocumentResponse'
, analyzeDocumentResponse_httpStatus
- The response's http status code.
Response Lenses
analyzeDocumentResponse_documentMetadata :: Lens' AnalyzeDocumentResponse (Maybe DocumentMetadata) Source #
Metadata about the analyzed document. An example is the number of pages.
analyzeDocumentResponse_blocks :: Lens' AnalyzeDocumentResponse (Maybe [Block]) Source #
The items that are detected and analyzed by AnalyzeDocument
.
analyzeDocumentResponse_humanLoopActivationOutput :: Lens' AnalyzeDocumentResponse (Maybe HumanLoopActivationOutput) Source #
Shows the results of the human in the loop evaluation.
analyzeDocumentResponse_analyzeDocumentModelVersion :: Lens' AnalyzeDocumentResponse (Maybe Text) Source #
The version of the model used to analyze the document.
analyzeDocumentResponse_httpStatus :: Lens' AnalyzeDocumentResponse Int Source #
The response's http status code.