Module Values.GetDocumentTextDetectionResponseSource

Gets the results for an Amazon Textract asynchronous operation that detects text in a document. Amazon Textract can detect lines of text and the words that make up a line of text. You start asynchronous text detection by calling StartDocumentTextDetection, which returns a job identifier (JobId). When the text detection 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 StartDocumentTextDetection. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. GetDocumentTextDetection returns 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. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentTextDetection, and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentTextDetection. For more information, see Document Text Detection.

Sourcetype nonrec t = {
  1. documentMetadata : DocumentMetadata.t option;
    (*

    Information about a document that Amazon Textract processed. DocumentMetadata is returned in every page of paginated responses from an Amazon Textract video operation.

    *)
  2. jobStatus : JobStatus.t option;
    (*

    The current status of the text detection job.

    *)
  3. nextToken : PaginationToken.t option;
    (*

    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.

    *)
  4. blocks : BlockList.t option;
    (*

    The results of the text-detection operation.

    *)
  5. warnings : Warnings.t option;
    (*

    A list of warnings that occurred during the text-detection operation for the document.

    *)
  6. statusMessage : StatusMessage.t option;
    (*

    Returns if the detection job could not be completed. Contains explanation for what error occured.

    *)
  7. detectDocumentTextModelVersion : String_.t option;
}
Sourcetype nonrec error = [
  1. | `AccessDeniedException of AccessDeniedException.t
  2. | `InternalServerError of InternalServerError.t
  3. | `InvalidJobIdException of InvalidJobIdException.t
  4. | `InvalidKMSKeyException of InvalidKMSKeyException.t
  5. | `InvalidParameterException of InvalidParameterException.t
  6. | `InvalidS3ObjectException of InvalidS3ObjectException.t
  7. | `ProvisionedThroughputExceededException of ProvisionedThroughputExceededException.t
  8. | `ThrottlingException of ThrottlingException.t
  9. | `Unknown_operation_error of string * string option
]
Sourceval make : ?documentMetadata:??? -> ?jobStatus:??? -> ?nextToken:??? -> ?blocks:??? -> ?warnings:??? -> ?statusMessage:??? -> ?detectDocumentTextModelVersion:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `AccessDeniedException of unit | `InternalServerError of unit | `InvalidJobIdException of unit | `InvalidKMSKeyException of unit | `InvalidParameterException of unit | `InvalidS3ObjectException of unit | `ProvisionedThroughputExceededException of unit | `ThrottlingException of unit | `Unknown_operation_error of string * string option ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `AccessDeniedException of unit | `InternalServerError of unit | `InvalidJobIdException of unit | `InvalidKMSKeyException of unit | `InvalidParameterException of unit | `InvalidS3ObjectException of unit | `ProvisionedThroughputExceededException of unit | `ThrottlingException of unit | `Unknown_operation_error of string * string option ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `Enum of string | `List of [> `Structure of (string * [> `Enum of string | `Float of Percent.t | `Integer of UInteger.t | `List of [> `Enum of string | `Integer of UInteger.t | `Structure of (string * [> `Enum of string | `List of [> `String of NonEmptyString.t ] list ]) list ] list | `String of String_.t | `Structure of (string * [> `Float of Angle.t | `List of [> `String of QueryPage.t | `Structure of (string * [> `Float of Float_.t ]) list ] list | `String of QueryInput.t | `Structure of (string * [> `Float of Float_.t ]) list ]) list ]) list ] list | `String of PaginationToken.t | `Structure of (string * [> `Integer of UInteger.t ]) list ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t