amazonka-comprehend-2.0: Amazon Comprehend SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Comprehend.Types.DocumentReaderConfig

Description

 
Synopsis

Documentation

data DocumentReaderConfig Source #

Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.

By default, Amazon Comprehend performs the following actions to extract text from files, based on the input file type:

  • Word files - Amazon Comprehend parser extracts the text.
  • Digital PDF files - Amazon Comprehend parser extracts the text.
  • Image files and scanned PDF files - Amazon Comprehend uses the Amazon Textract DetectDocumentText API to extract the text.

DocumentReaderConfig does not apply to plain text files or Word files.

For image files and PDF documents, you can override these default actions using the fields listed below. For more information, see Setting text extraction options.

See: newDocumentReaderConfig smart constructor.

Constructors

DocumentReaderConfig' 

Fields

  • documentReadMode :: Maybe DocumentReadMode

    Determines the text extraction actions for PDF files. Enter one of the following values:

    • SERVICE_DEFAULT - use the Amazon Comprehend service defaults for PDF files.
    • FORCE_DOCUMENT_READ_ACTION - Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files.
  • featureTypes :: Maybe (NonEmpty DocumentReadFeatureTypes)

    Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT as the read action, you must specify one or both of the following values:

    • TABLES - Returns information about any tables that are detected in the input document.
    • FORMS - Returns information and the data from any forms that are detected in the input document.
  • documentReadAction :: DocumentReadAction

    This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:

    • TEXTRACT_DETECT_DOCUMENT_TEXT - The Amazon Comprehend service uses the DetectDocumentText API operation.
    • TEXTRACT_ANALYZE_DOCUMENT - The Amazon Comprehend service uses the AnalyzeDocument API operation.

Instances

Instances details
FromJSON DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

ToJSON DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

Generic DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

Associated Types

type Rep DocumentReaderConfig :: Type -> Type #

Read DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

Show DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

NFData DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

Methods

rnf :: DocumentReaderConfig -> () #

Eq DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

Hashable DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

type Rep DocumentReaderConfig Source # 
Instance details

Defined in Amazonka.Comprehend.Types.DocumentReaderConfig

type Rep DocumentReaderConfig = D1 ('MetaData "DocumentReaderConfig" "Amazonka.Comprehend.Types.DocumentReaderConfig" "amazonka-comprehend-2.0-Ko6GCjAQF2RARapSdPn69F" 'False) (C1 ('MetaCons "DocumentReaderConfig'" 'PrefixI 'True) (S1 ('MetaSel ('Just "documentReadMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DocumentReadMode)) :*: (S1 ('MetaSel ('Just "featureTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty DocumentReadFeatureTypes))) :*: S1 ('MetaSel ('Just "documentReadAction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DocumentReadAction))))

newDocumentReaderConfig Source #

Create a value of DocumentReaderConfig with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:documentReadMode:DocumentReaderConfig', documentReaderConfig_documentReadMode - Determines the text extraction actions for PDF files. Enter one of the following values:

  • SERVICE_DEFAULT - use the Amazon Comprehend service defaults for PDF files.
  • FORCE_DOCUMENT_READ_ACTION - Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files.

$sel:featureTypes:DocumentReaderConfig', documentReaderConfig_featureTypes - Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT as the read action, you must specify one or both of the following values:

  • TABLES - Returns information about any tables that are detected in the input document.
  • FORMS - Returns information and the data from any forms that are detected in the input document.

$sel:documentReadAction:DocumentReaderConfig', documentReaderConfig_documentReadAction - This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:

  • TEXTRACT_DETECT_DOCUMENT_TEXT - The Amazon Comprehend service uses the DetectDocumentText API operation.
  • TEXTRACT_ANALYZE_DOCUMENT - The Amazon Comprehend service uses the AnalyzeDocument API operation.

documentReaderConfig_documentReadMode :: Lens' DocumentReaderConfig (Maybe DocumentReadMode) Source #

Determines the text extraction actions for PDF files. Enter one of the following values:

  • SERVICE_DEFAULT - use the Amazon Comprehend service defaults for PDF files.
  • FORCE_DOCUMENT_READ_ACTION - Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files.

documentReaderConfig_featureTypes :: Lens' DocumentReaderConfig (Maybe (NonEmpty DocumentReadFeatureTypes)) Source #

Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT as the read action, you must specify one or both of the following values:

  • TABLES - Returns information about any tables that are detected in the input document.
  • FORMS - Returns information and the data from any forms that are detected in the input document.

documentReaderConfig_documentReadAction :: Lens' DocumentReaderConfig DocumentReadAction Source #

This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:

  • TEXTRACT_DETECT_DOCUMENT_TEXT - The Amazon Comprehend service uses the DetectDocumentText API operation.
  • TEXTRACT_ANALYZE_DOCUMENT - The Amazon Comprehend service uses the AnalyzeDocument API operation.