Amazon Comprehend · JSON Structure

Openapi.Yml Document Classifier Input Data Config Structure

The input properties for training a document classifier.

For more information on how the input file is formatted, see Preparing training data in the Comprehend Developer Guide.

Type: object Properties: 8
Machine LearningNatural Language ProcessingNLPText Analysis

DocumentClassifierInputDataConfig is a JSON Structure definition published by Amazon Comprehend, describing 8 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

DataFormat S3Uri TestS3Uri LabelDelimiter AugmentedManifests DocumentType Documents DocumentReaderConfig

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-comprehend/refs/heads/main/json-structure/openapi.yml-document-classifier-input-data-config-structure.json",
  "name": "DocumentClassifierInputDataConfig",
  "description": "<p>The input properties for training a document classifier. </p> <p>For more information on how the input file is formatted, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/prep-classifier-data.html\">Preparing training data</a> in the Comprehend Developer Guide. </p>",
  "type": "object",
  "properties": {
    "DataFormat": {
      "allOf": [
        {
          "$ref": "#/components/schemas/DocumentClassifierDataFormat"
        },
        {
          "description": "<p>The format of your training data:</p> <ul> <li> <p> <code>COMPREHEND_CSV</code>: A two-column CSV file, where labels are provided in the first column, and documents are provided in the second. If you use this value, you must provide the <code>S3Uri</code> parameter in your request.</p> </li> <li> <p> <code>AUGMENTED_MANIFEST</code>: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its associated labels. </p> <p>If you use this value, you must provide the <code>AugmentedManifests</code> parameter in your request.</p> </li> </ul> <p>If you don't specify a value, Amazon Comprehend uses <code>COMPREHEND_CSV</code> as the default.</p>"
        }
      ]
    },
    "S3Uri": {
      "allOf": [
        {
          "$ref": "#/components/schemas/S3Uri"
        },
        {
          "description": "<p>The Amazon S3 URI for the input data. The S3 bucket must be in the same Region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files.</p> <p>For example, if you use the URI <code>S3://bucketName/prefix</code>, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input.</p> <p>This parameter is required if you set <code>DataFormat</code> to <code>COMPREHEND_CSV</code>.</p>"
        }
      ]
    },
    "TestS3Uri": {
      "allOf": [
        {
          "$ref": "#/components/schemas/S3Uri"
        },
        {
          "description": "This specifies the Amazon S3 location where the test annotations for an entity recognizer are located. The URI must be in the same Amazon Web Services Region as the API endpoint that you are calling. "
        }
      ]
    },
    "LabelDelimiter": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LabelDelimiter"
        },
        {
          "description": "Indicates the delimiter used to separate each label for training a multi-label classifier. The default delimiter between labels is a pipe (|). You can use a different character as a delimiter (if it's an allowed character) by specifying it under Delimiter for labels. If the training documents use a delimiter other than the default or the delimiter you specify, the labels on that line will be combined to make a single unique label, such as LABELLABELLABEL."
        }
      ]
    },
    "AugmentedManifests": {
      "allOf": [
        {
          "$ref": "#/components/schemas/DocumentClassifierAugmentedManifestsList"
        },
        {
          "description": "<p>A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.</p> <p>This parameter is required if you set <code>DataFormat</code> to <code>AUGMENTED_MANIFEST</code>.</p>"
        }
      ]
    },
    "DocumentType": {
      "allOf": [
        {
          "$ref": "#/components/schemas/DocumentClassifierDocumentTypeFormat"
        },
        {
          "description": "The type of input documents for training the model. Provide plain-text documents to create a plain-text model, and provide semi-structured documents to create a native model."
        }
      ]
    },
    "Documents": {
      "allOf": [
        {
          "$ref": "#/components/schemas/DocumentClassifierDocuments"
        },
        {
          "description": "The S3 location of the training documents. This parameter is required in a request to create a native classifier model."
        }
      ]
    },
    "DocumentReaderConfig": {
      "$ref": "#/components/schemas/DocumentReaderConfig"
    }
  }
}