Textract.Client.
get_lending_analysis_summary
(**kwargs)¶Gets summarized results for the StartLendingAnalysis
operation, which analyzes text in a lending document. The returned summary consists of information about documents grouped together by a common document type. Information like detected signatures, page numbers, and split documents is returned with respect to the type of grouped document.
You start asynchronous text analysis by calling StartLendingAnalysis
, which returns a job identifier ( JobId
). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartLendingAnalysis
.
To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetLendingAnalysisSummary
, and pass the job identifier ( JobId
) from the initial call to StartLendingAnalysis
.
See also: AWS API Documentation
Request Syntax
response = client.get_lending_analysis_summary(
JobId='string'
)
[REQUIRED]
A unique identifier for the lending or text-detection job. The JobId
is returned from StartLendingAnalysis. A JobId
value is only valid for 7 days.
{
'DocumentMetadata': {
'Pages': 123
},
'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'PARTIAL_SUCCESS',
'Summary': {
'DocumentGroups': [
{
'Type': 'string',
'SplitDocuments': [
{
'Index': 123,
'Pages': [
123,
]
},
],
'DetectedSignatures': [
{
'Page': 123
},
],
'UndetectedSignatures': [
{
'Page': 123
},
]
},
],
'UndetectedDocumentTypes': [
'string',
]
},
'Warnings': [
{
'ErrorCode': 'string',
'Pages': [
123,
]
},
],
'StatusMessage': 'string',
'AnalyzeLendingModelVersion': 'string'
}
Response Structure
Information about the input document.
The number of pages that are detected in the document.
The current status of the lending analysis job.
Contains summary information for documents grouped by type.
Contains an array of all DocumentGroup objects.
Summary information about documents grouped by the same document type.
The type of document that Amazon Textract has detected. See LINK for a list of all types returned by Textract.
An array that contains information about the pages of a document, defined by logical boundary.
Contains information about the pages of a document, defined by logical boundary.
The index for a given document in a DocumentGroup of a specific Type.
An array of page numbers for a for a given document, ordered by logical boundary.
A list of the detected signatures found in a document group.
A structure that holds information regarding a detected signature on a page.
The page a detected signature was found on.
A list of any expected signatures not found in a document group.
A structure containing information about an undetected signature on a page where it was expected but not found.
The page where a signature was expected but not found.
UndetectedDocumentTypes.
A list of warnings that occurred during the lending analysis operation.
A warning about an issue that occurred during asynchronous text analysis ( StartDocumentAnalysis ) or asynchronous document text detection ( StartDocumentTextDetection ).
The error code for the warning.
A list of the pages that the warning applies to.
Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
The current model version of the Analyze Lending API.
Exceptions
Textract.Client.exceptions.InvalidParameterException
Textract.Client.exceptions.AccessDeniedException
Textract.Client.exceptions.ProvisionedThroughputExceededException
Textract.Client.exceptions.InvalidJobIdException
Textract.Client.exceptions.InternalServerError
Textract.Client.exceptions.ThrottlingException
Textract.Client.exceptions.InvalidS3ObjectException
Textract.Client.exceptions.InvalidKMSKeyException