JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.793

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.services.comprehend.model

Class DocumentReaderConfig

  • All Implemented Interfaces:
    StructuredPojo, Serializable, Cloneable


    @Generated(value="com.amazonaws:aws-java-sdk-code-generator")
    public class DocumentReaderConfig
    extends Object
    implements Serializable, Cloneable, StructuredPojo 

    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 in the Comprehend Developer Guide.

    See Also:
    AWS API Documentation, Serialized Form
    • Constructor Detail

      • DocumentReaderConfig

        public DocumentReaderConfig()
    • Method Detail

      • setDocumentReadAction

        public void setDocumentReadAction(String 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.

        Parameters:
        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.

        See Also:
        DocumentReadAction
      • getDocumentReadAction

        public String getDocumentReadAction()

        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.

        Returns:
        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.

        See Also:
        DocumentReadAction
      • withDocumentReadAction

        public DocumentReaderConfig withDocumentReadAction(String 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        DocumentReadAction
      • withDocumentReadAction

        public DocumentReaderConfig withDocumentReadAction(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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        DocumentReadAction
      • setDocumentReadMode

        public void setDocumentReadMode(String 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.

        Parameters:
        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.

        See Also:
        DocumentReadMode
      • getDocumentReadMode

        public String getDocumentReadMode()

        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.

        Returns:
        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.

        See Also:
        DocumentReadMode
      • withDocumentReadMode

        public DocumentReaderConfig withDocumentReadMode(String 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        DocumentReadMode
      • withDocumentReadMode

        public DocumentReaderConfig withDocumentReadMode(DocumentReadMode 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        DocumentReadMode
      • getFeatureTypes

        public List<String> getFeatureTypes()

        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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        Returns:
        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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        See Also:
        DocumentReadFeatureTypes
      • setFeatureTypes

        public void setFeatureTypes(Collection<String> 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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        Parameters:
        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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        See Also:
        DocumentReadFeatureTypes
      • withFeatureTypes

        public DocumentReaderConfig withFeatureTypes(String... 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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        NOTE: This method appends the values to the existing list (if any). Use setFeatureTypes(java.util.Collection) or withFeatureTypes(java.util.Collection) if you want to override the existing values.

        Parameters:
        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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        DocumentReadFeatureTypes
      • withFeatureTypes

        public DocumentReaderConfig withFeatureTypes(Collection<String> 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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        Parameters:
        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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        DocumentReadFeatureTypes
      • withFeatureTypes

        public DocumentReaderConfig withFeatureTypes(DocumentReadFeatureTypes... 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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        Parameters:
        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 additional information about any tables that are detected in the input document.

        • FORMS - Returns additional information about any forms that are detected in the input document.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        DocumentReadFeatureTypes
      • toString

        public String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /