get_lending_analysis_summary

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'
)
Parameters
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.

Return type
dict
Returns
Response Syntax
{
    '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

  • (dict) --
    • DocumentMetadata (dict) --

      Information about the input document.

      • Pages (integer) --

        The number of pages that are detected in the document.

    • JobStatus (string) --

      The current status of the lending analysis job.

    • Summary (dict) --

      Contains summary information for documents grouped by type.

      • DocumentGroups (list) --

        Contains an array of all DocumentGroup objects.

        • (dict) --

          Summary information about documents grouped by the same document type.

          • Type (string) --

            The type of document that Amazon Textract has detected. See LINK for a list of all types returned by Textract.

          • SplitDocuments (list) --

            An array that contains information about the pages of a document, defined by logical boundary.

            • (dict) --

              Contains information about the pages of a document, defined by logical boundary.

              • Index (integer) --

                The index for a given document in a DocumentGroup of a specific Type.

              • Pages (list) --

                An array of page numbers for a for a given document, ordered by logical boundary.

                • (integer) --
          • DetectedSignatures (list) --

            A list of the detected signatures found in a document group.

            • (dict) --

              A structure that holds information regarding a detected signature on a page.

              • Page (integer) --

                The page a detected signature was found on.

          • UndetectedSignatures (list) --

            A list of any expected signatures not found in a document group.

            • (dict) --

              A structure containing information about an undetected signature on a page where it was expected but not found.

              • Page (integer) --

                The page where a signature was expected but not found.

      • UndetectedDocumentTypes (list) --

        UndetectedDocumentTypes.

        • (string) --
    • Warnings (list) --

      A list of warnings that occurred during the lending analysis operation.

      • (dict) --

        A warning about an issue that occurred during asynchronous text analysis ( StartDocumentAnalysis ) or asynchronous document text detection ( StartDocumentTextDetection ).

        • ErrorCode (string) --

          The error code for the warning.

        • Pages (list) --

          A list of the pages that the warning applies to.

          • (integer) --
    • StatusMessage (string) --

      Returns if the lending analysis could not be completed. Contains explanation for what error occurred.

    • AnalyzeLendingModelVersion (string) --

      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