Module Values.DetectDocumentTextResponseSource

Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be in one of the following image formats: JPEG, PNG, PDF, or TIFF. DetectDocumentText returns the detected text in 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. DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection. For more information, see Document Text Detection.

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

    Metadata about the document. It contains the number of pages that are detected in the document.

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

    An array of Block objects that contain the text that's detected in the document.

    *)
  3. detectDocumentTextModelVersion : String_.t option;
}
Sourcetype nonrec error = [
  1. | `AccessDeniedException of AccessDeniedException.t
  2. | `BadDocumentException of BadDocumentException.t
  3. | `DocumentTooLargeException of DocumentTooLargeException.t
  4. | `InternalServerError of InternalServerError.t
  5. | `InvalidParameterException of InvalidParameterException.t
  6. | `InvalidS3ObjectException of InvalidS3ObjectException.t
  7. | `ProvisionedThroughputExceededException of ProvisionedThroughputExceededException.t
  8. | `ThrottlingException of ThrottlingException.t
  9. | `UnsupportedDocumentException of UnsupportedDocumentException.t
  10. | `Unknown_operation_error of string * string option
]
Sourceval make : ?documentMetadata:??? -> ?blocks:??? -> ?detectDocumentTextModelVersion:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `AccessDeniedException of unit | `BadDocumentException of unit | `DocumentTooLargeException of unit | `InternalServerError of unit | `InvalidParameterException of unit | `InvalidS3ObjectException of unit | `ProvisionedThroughputExceededException of unit | `ThrottlingException of unit | `Unknown_operation_error of string * string option | `UnsupportedDocumentException of unit ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `AccessDeniedException of unit | `BadDocumentException of unit | `DocumentTooLargeException of unit | `InternalServerError of unit | `InvalidParameterException of unit | `InvalidS3ObjectException of unit | `ProvisionedThroughputExceededException of unit | `ThrottlingException of unit | `Unknown_operation_error of string * string option | `UnsupportedDocumentException of unit ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `List of [> `Structure of (string * [> `Enum of string | `Float of Percent.t | `Integer of UInteger.t | `List of [> `Enum of string | `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 String_.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