Skip to content

EntityRecognizerInputDataConfig

Source code in docs_src/capo_comprehend/types/entity_recognizer_input_data_config.py
class EntityRecognizerInputDataConfig(TypedDict, closed=True):
    data_format: NotRequired[
        "capo_comprehend.types.entity_recognizer_data_format.EntityRecognizerDataFormat"
    ]
    """<p>The format of your training data:</p> <ul> <li> <p> <code>COMPREHEND_CSV</code>: A CSV file that supplements your training documents. The CSV file contains information about the custom entities that your trained model will detect. The required format of the file depends on whether you are providing annotations or an entity list.</p> <p>If you use this value, you must provide your CSV file by using either the <code>Annotations</code> or <code>EntityList</code> parameters. You must provide your training documents by using the <code>Documents</code> parameter.</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 labels. Each label annotates a named entity in the training document. </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>"""
    entity_types: "capo_comprehend.types.entity_types_list.EntityTypesList"
    r"""<p>The entity types in the labeled training data that Amazon Comprehend uses to train the custom entity recognizer. Any entity types that you don't specify are ignored.</p> <p>A maximum of 25 entity types can be used at one time to train an entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break), \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma). </p>"""
    documents: NotRequired[
        "capo_comprehend.types.entity_recognizer_documents.EntityRecognizerDocuments"
    ]
    """<p>The S3 location of the folder that contains the training documents for your custom entity recognizer.</p> <p>This parameter is required if you set <code>DataFormat</code> to <code>COMPREHEND_CSV</code>.</p>"""
    annotations: NotRequired[
        "capo_comprehend.types.entity_recognizer_annotations.EntityRecognizerAnnotations"
    ]
    """<p>The S3 location of the CSV file that annotates your training documents.</p>"""
    entity_list: NotRequired[
        "capo_comprehend.types.entity_recognizer_entity_list.EntityRecognizerEntityList"
    ]
    """<p>The S3 location of the CSV file that has the entity list for your custom entity recognizer.</p>"""
    augmented_manifests: NotRequired[
        "capo_comprehend.types.entity_recognizer_augmented_manifests_list.EntityRecognizerAugmentedManifestsList"
    ]
    """<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>"""

annotations instance-attribute

annotations: NotRequired[EntityRecognizerAnnotations]

The S3 location of the CSV file that annotates your training documents.

augmented_manifests instance-attribute

augmented_manifests: NotRequired[EntityRecognizerAugmentedManifestsList]

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.

This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.

data_format instance-attribute

data_format: NotRequired[EntityRecognizerDataFormat]

The format of your training data:

  • COMPREHEND_CSV: A CSV file that supplements your training documents. The CSV file contains information about the custom entities that your trained model will detect. The required format of the file depends on whether you are providing annotations or an entity list.

    If you use this value, you must provide your CSV file by using either the Annotations or EntityList parameters. You must provide your training documents by using the Documents parameter.

  • AUGMENTED_MANIFEST: 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 labels. Each label annotates a named entity in the training document.

    If you use this value, you must provide the AugmentedManifests parameter in your request.

If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.

documents instance-attribute

documents: NotRequired[EntityRecognizerDocuments]

The S3 location of the folder that contains the training documents for your custom entity recognizer.

This parameter is required if you set DataFormat to COMPREHEND_CSV.

entity_list instance-attribute

entity_list: NotRequired[EntityRecognizerEntityList]

The S3 location of the CSV file that has the entity list for your custom entity recognizer.

entity_types instance-attribute

entity_types: EntityTypesList

The entity types in the labeled training data that Amazon Comprehend uses to train the custom entity recognizer. Any entity types that you don't specify are ignored.

A maximum of 25 entity types can be used at one time to train an entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break), \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).