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 |
Detects text in the input document. Amazon Textract can detect lines of
text and the words that make up a line of text. The input document must
be an image in JPEG or PNG format. DetectDocumentText
returns the
detected text in an array of Block objects.
Each document page has as an associated Block
of type PAGE. Each PAGE
Block
object is the parent of LINE Block
objects that represent the
lines of detected text on a page. A LINE Block
object is a parent for
each word that makes up the line. Words are represented by Block
objects of type WORD.
DetectDocumentText
is a synchronous operation. To analyze documents
asynchronously, use StartDocumentTextDetection.
For more information, see Document Text Detection.
Synopsis
- data DetectDocumentText = DetectDocumentText' {}
- newDetectDocumentText :: Document -> DetectDocumentText
- detectDocumentText_document :: Lens' DetectDocumentText Document
- data DetectDocumentTextResponse = DetectDocumentTextResponse' {}
- newDetectDocumentTextResponse :: Int -> DetectDocumentTextResponse
- detectDocumentTextResponse_documentMetadata :: Lens' DetectDocumentTextResponse (Maybe DocumentMetadata)
- detectDocumentTextResponse_blocks :: Lens' DetectDocumentTextResponse (Maybe [Block])
- detectDocumentTextResponse_detectDocumentTextModelVersion :: Lens' DetectDocumentTextResponse (Maybe Text)
- detectDocumentTextResponse_httpStatus :: Lens' DetectDocumentTextResponse Int
Creating a Request
data DetectDocumentText Source #
See: newDetectDocumentText
smart constructor.
DetectDocumentText' | |
|
Instances
newDetectDocumentText Source #
Create a value of DetectDocumentText
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:document:DetectDocumentText'
, detectDocumentText_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.
Request Lenses
detectDocumentText_document :: Lens' DetectDocumentText 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.
Destructuring the Response
data DetectDocumentTextResponse Source #
See: newDetectDocumentTextResponse
smart constructor.
DetectDocumentTextResponse' | |
|
Instances
newDetectDocumentTextResponse Source #
Create a value of DetectDocumentTextResponse
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:DetectDocumentTextResponse'
, detectDocumentTextResponse_documentMetadata
- Metadata about the document. It contains the number of pages that are
detected in the document.
$sel:blocks:DetectDocumentTextResponse'
, detectDocumentTextResponse_blocks
- An array of Block
objects that contain the text that's detected in
the document.
$sel:detectDocumentTextModelVersion:DetectDocumentTextResponse'
, detectDocumentTextResponse_detectDocumentTextModelVersion
-
$sel:httpStatus:DetectDocumentTextResponse'
, detectDocumentTextResponse_httpStatus
- The response's http status code.
Response Lenses
detectDocumentTextResponse_documentMetadata :: Lens' DetectDocumentTextResponse (Maybe DocumentMetadata) Source #
Metadata about the document. It contains the number of pages that are detected in the document.
detectDocumentTextResponse_blocks :: Lens' DetectDocumentTextResponse (Maybe [Block]) Source #
An array of Block
objects that contain the text that's detected in
the document.
detectDocumentTextResponse_detectDocumentTextModelVersion :: Lens' DetectDocumentTextResponse (Maybe Text) Source #
detectDocumentTextResponse_httpStatus :: Lens' DetectDocumentTextResponse Int Source #
The response's http status code.