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 JPG or PNG format.
If you are using an AWS SDK to call Amazon Textract, you might not need
to base64-encode image bytes passed using the Bytes field.
List<E> featureTypes
A list of the types of analysis to perform. Add TABLES to the list to
return information about the tables detected in the input document. Add
FORMS to return detected fields and the associated text. To perform both
types of analysis, add TABLES and FORMS to FeatureTypes.
DocumentMetadata documentMetadata
Metadata about the analyzed document. An example is the number of pages.
List<E> blocks
The text that's detected and analyzed by AnalyzeDocument.
String blockType
The type of text that's recognized in a block. In text-detection operations, the following types are returned:
PAGE - Contains a list of the LINE Block objects that are detected on a document page.
WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that's detected on a document page.
In text analysis operations, the following types are returned:
PAGE - Contains a list of child Block objects that are detected on a document page.
KEY_VALUE_SET - Stores the KEY and VALUE Block objects for a field
that's detected on a document page. Use the EntityType field
to determine if a KEY_VALUE_SET object is a KEY Block object or a VALUE
Block object.
WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces that's detected on a document page.
LINE - A string of tab-delimited, contiguous words that's detected on a document page.
TABLE - A table that's detected on a document page. A table is any grid-based information with 2 or more rows or columns with a cell span of 1 row and 1 column each.
CELL - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.
SELECTION_ELEMENT - A selectable element such as a radio button or
checkbox that's detected on a document page. Use the value of
SelectionStatus to determine the status of the selection
element.
Constraints:
Allowed Values: KEY_VALUE_SET, PAGE, LINE, WORD, TABLE, CELL,
SELECTION_ELEMENT
Float confidence
The confidence that Amazon Textract has in the accuracy of the recognized text and the accuracy of the geometry points around the recognized text.
Constraints:
Length: 0 - 100
String text
The word or line of text that's recognized by Amazon Textract.
Integer rowIndex
The row in which a table cell is located. The first row position is 1.
RowIndex isn't returned by DetectDocumentText
and GetDocumentTextDetection.
Constraints:
Range: 0 -
Integer columnIndex
The column in which a table cell appears. The first column position is 1.
ColumnIndex isn't returned by
DetectDocumentText and GetDocumentTextDetection
.
Constraints:
Range: 0 -
Integer rowSpan
The number of rows that a table spans. RowSpan isn't
returned by DetectDocumentText and
GetDocumentTextDetection.
Constraints:
Range: 0 -
Integer columnSpan
The number of columns that a table cell spans. ColumnSpan
isn't returned by DetectDocumentText and
GetDocumentTextDetection.
Constraints:
Range: 0 -
Geometry geometry
The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that surrounds the text, and a finer-grain polygon for more accurate spatial information.
String id
The identifier for the recognized text. The identifier is only unique for a single operation.
Constraints:
Pattern: .*\S.*
List<E> relationships
A list of child blocks of the current block. For example a LINE object has child blocks for each WORD block that's part of the line of text. There aren't Relationship objects in the list for relationships that don't exist, such as when the current block has no child blocks. The list size can be the following:
0 - The block has no child blocks.
1 - The block has child blocks.
List<E> entityTypes
The type of entity. The following can be returned:
KEY - An identifier for a field on the document.
VALUE - The field text.
EntityTypes isn't returned by
DetectDocumentText and GetDocumentTextDetection
.
String selectionStatus
The selection status of a selectable element such as a radio button or checkbox.
Constraints:
Allowed Values: SELECTED, NOT_SELECTED
Integer page
The page in which a block was detected. Page is returned by
asynchronous operations. Page values greater than 1 are only returned for
multi-page documents that are in PDF format. A scanned image (JPG/PNG),
even if it contains multiple document pages, is always considered to be a
single-page document and the value of Page is always 1.
Synchronous operations don't return Page as every input
document is considered to be a single-page document.
Constraints:
Range: 0 -
Float width
The width of the bounding box as a ratio of the overall document page width.
Float height
The height of the bounding box as a ratio of the overall document page height.
Float left
The left coordinate of the bounding box as a ratio of overall document page width.
Float top
The top coordinate of the bounding box as a ratio of overall document page height.
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 JPG or PNG format.
If you are using an AWS SDK to call Amazon Textract, you might not need
to base64-encode image bytes passed using the Bytes field.
DocumentMetadata documentMetadata
Metadata about the document. Contains the number of pages that are detected in the document.
List<E> blocks
An array of Block objects containing the text detected in the document.
ByteBuffer bytes
A blob of base-64 encoded documents bytes. The maximum size of a document that's provided in a blob of bytes is 5 MB. The document bytes must be in PNG or JPG format.
If you are using an AWS SDK to call Amazon Textract, you might not need
to base64-encode image bytes passed using the Bytes field.
Constraints:
Length: 1 - 5242880
S3Object s3Object
Identifies an S3 object as the document source. The maximum size of a document stored in an S3 bucket is 5 MB.
S3Object s3Object
The Amazon S3 bucket that contains the input document.
Integer pages
The number of pages detected in the document.
Constraints:
Range: 0 -
BoundingBox boundingBox
An axis-aligned coarse representation of the location of the recognized text on the document page.
List<E> polygon
Within the bounding box, a fine-grained polygon around the recognized text.
String jobId
A unique identifier for the text-detection job. The JobId is
returned from StartDocumentAnalysis.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
Integer maxResults
The maximum number of results to return per paginated call. The largest value that you can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is returned. The default value is 1,000.
Constraints:
Range: 1 -
String nextToken
If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of blocks.
Constraints:
Length: 1 - 255
Pattern: .*\S.*
DocumentMetadata documentMetadata
Information about a document that Amazon Textract processed.
DocumentMetadata is returned in every page of paginated
responses from an Amazon Textract video operation.
String jobStatus
The current status of the text detection job.
Constraints:
Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED, PARTIAL_SUCCESS
String nextToken
If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text detection results.
Constraints:
Length: 1 - 255
Pattern: .*\S.*
List<E> blocks
The results of the text analysis operation.
List<E> warnings
A list of warnings that occurred during the document analysis operation.
String statusMessage
The current status of an asynchronous document analysis operation.
String jobId
A unique identifier for the text detection job. The JobId is
returned from StartDocumentTextDetection.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
Integer maxResults
The maximum number of results to return per paginated call. The largest value you can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is returned. The default value is 1,000.
Constraints:
Range: 1 -
String nextToken
If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of blocks.
Constraints:
Length: 1 - 255
Pattern: .*\S.*
DocumentMetadata documentMetadata
Information about a document that Amazon Textract processed.
DocumentMetadata is returned in every page of paginated
responses from an Amazon Textract video operation.
String jobStatus
The current status of the text detection job.
Constraints:
Allowed Values: IN_PROGRESS, SUCCEEDED, FAILED, PARTIAL_SUCCESS
String nextToken
If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text-detection results.
Constraints:
Length: 1 - 255
Pattern: .*\S.*
List<E> blocks
The results of the text-detection operation.
List<E> warnings
A list of warnings that occurred during the document text-detection operation.
String statusMessage
The current status of an asynchronous document text-detection operation.
String sNSTopicArn
The Amazon SNS topic that Amazon Textract posts the completion status to.
Constraints:
Length: 20 - 1024
Pattern: (^arn:([a-z\d-]+):sns:[a-zA-Z\d-]{1,20}:\w{12}:.+$)
String roleArn
The Amazon Resource Name (ARN) of an IAM role that gives Amazon Textract publishing permissions to the Amazon SNS topic.
Constraints:
Length: 20 - 2048
Pattern: arn:([a-z\d-]+):iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
String type
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD.
Constraints:
Allowed Values: VALUE, CHILD
List<E> ids
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
String bucket
The name of the S3 bucket.
Constraints:
Length: 3 - 255
Pattern: [0-9A-Za-z\.\-_]*
String name
The file name of the input document. It must be an image file (.JPG or .PNG format). Asynchronous operations also support PDF files.
Constraints:
Length: 1 - 1024
Pattern: .*\S.*
String version
If the bucket has versioning enabled, you can specify the object version.
Constraints:
Length: 1 - 1024
Pattern: .*\S.*
DocumentLocation documentLocation
The location of the document to be processed.
List<E> 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 fields and the associated text. To
perform both types of analysis, add TABLES and FORMS to
FeatureTypes. All selectable elements (
SELECTION_ELEMENT) that are detected are returned, whatever
the value of FeatureTypes.
String clientRequestToken
The idempotent token that you use to identify the start request. If you
use the same token with multiple StartDocumentAnalysis
requests, the same JobId is returned. Use
ClientRequestToken to prevent the same job from being
accidentally started more than once.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
String jobTag
An identifier you specify that's included in the completion notification
that's published to the Amazon SNS topic. For example, you can use
JobTag to identify the type of document, such as a tax form
or a receipt, that the completion notification corresponds to.
Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9_.\-:]+
NotificationChannel notificationChannel
The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
String jobId
The identifier for the document text detection job. Use
JobId to identify the job in a subsequent call to
GetDocumentAnalysis.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
DocumentLocation documentLocation
The location of the document to be processed.
String clientRequestToken
The idempotent token that's used to identify the start request. If you
use the same token with multiple StartDocumentTextDetection
requests, the same JobId is returned. Use
ClientRequestToken to prevent the same job from being
accidentally started more than once.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
String jobTag
An identifier you specify that's included in the completion notification
that's published to the Amazon SNS topic. For example, you can use
JobTag to identify the type of document, such as a tax form
or a receipt, that the completion notification corresponds to.
Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9_.\-:]+
NotificationChannel notificationChannel
The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
String jobId
The identifier for the document text-detection job. Use
JobId to identify the job in a subsequent call to
GetDocumentTextDetection.
Constraints:
Length: 1 - 64
Pattern: ^[a-zA-Z0-9-_]+$
Copyright © 2019. All rights reserved.