libZSservicesZSamazonka-textractZSamazonka-textract
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Textract.DetectDocumentText

Description

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

Creating a Request

data DetectDocumentText Source #

See: newDetectDocumentText smart constructor.

Constructors

DetectDocumentText' 

Fields

  • document :: 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.

Instances

Instances details
Eq DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Read DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Show DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Generic DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Associated Types

type Rep DetectDocumentText :: Type -> Type #

NFData DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Methods

rnf :: DetectDocumentText -> () #

Hashable DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

ToJSON DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

AWSRequest DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Associated Types

type AWSResponse DetectDocumentText #

ToHeaders DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

ToPath DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

ToQuery DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

type Rep DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

type Rep DetectDocumentText = D1 ('MetaData "DetectDocumentText" "Amazonka.Textract.DetectDocumentText" "libZSservicesZSamazonka-textractZSamazonka-textract" 'False) (C1 ('MetaCons "DetectDocumentText'" 'PrefixI 'True) (S1 ('MetaSel ('Just "document") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Document)))
type AWSResponse DetectDocumentText Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

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.

Constructors

DetectDocumentTextResponse' 

Fields

Instances

Instances details
Eq DetectDocumentTextResponse Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Read DetectDocumentTextResponse Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Show DetectDocumentTextResponse Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Generic DetectDocumentTextResponse Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

Associated Types

type Rep DetectDocumentTextResponse :: Type -> Type #

NFData DetectDocumentTextResponse Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

type Rep DetectDocumentTextResponse Source # 
Instance details

Defined in Amazonka.Textract.DetectDocumentText

type Rep DetectDocumentTextResponse = D1 ('MetaData "DetectDocumentTextResponse" "Amazonka.Textract.DetectDocumentText" "libZSservicesZSamazonka-textractZSamazonka-textract" 'False) (C1 ('MetaCons "DetectDocumentTextResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "documentMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DocumentMetadata)) :*: S1 ('MetaSel ('Just "blocks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Block]))) :*: (S1 ('MetaSel ('Just "detectDocumentTextModelVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.