public class AnalyzeDocumentRequest extends AmazonWebServiceRequest implements Serializable
Analyzes an input document for relationships between detected items.
The types of information returned are as follows:
Words and lines that are related to nearby lines and words. The related
information is returned in two Block objects each of type
KEY_VALUE_SET: a KEY Block object and a VALUE Block 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 CELL Block object is returned for each cell in a table.
Selectable elements such as checkboxes and radio buttons. A SELECTION_ELEMENT Block object contains information about a selectable element.
Lines and words of text. A LINE Block object contains one or more WORD Block objects.
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.
| Constructor and Description |
|---|
AnalyzeDocumentRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Document |
getDocument()
The input document as base64-encoded bytes or an Amazon S3 object.
|
List<String> |
getFeatureTypes()
A list of the types of analysis to perform.
|
int |
hashCode() |
void |
setDocument(Document document)
The input document as base64-encoded bytes or an Amazon S3 object.
|
void |
setFeatureTypes(Collection<String> featureTypes)
A list of the types of analysis to perform.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AnalyzeDocumentRequest |
withDocument(Document document)
The input document as base64-encoded bytes or an Amazon S3 object.
|
AnalyzeDocumentRequest |
withFeatureTypes(Collection<String> featureTypes)
A list of the types of analysis to perform.
|
AnalyzeDocumentRequest |
withFeatureTypes(String... featureTypes)
A list of the types of analysis to perform.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic Document getDocument()
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.
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.
public void setDocument(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.
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.
public AnalyzeDocumentRequest withDocument(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.
Returns a reference to this object so that method calls can be chained together.
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.
public List<String> getFeatureTypes()
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.
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.
public void setFeatureTypes(Collection<String> 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.
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.
public AnalyzeDocumentRequest withFeatureTypes(String... 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.
Returns a reference to this object so that method calls can be chained together.
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.
public AnalyzeDocumentRequest withFeatureTypes(Collection<String> 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.
Returns a reference to this object so that method calls can be chained together.
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.
public String toString()
toString in class ObjectObject.toString()Copyright © 2019. All rights reserved.