Skip to content

DetectEntitiesResponse

Source code in docs_src/capo_comprehend/types/detect_entities_response.py
class DetectEntitiesResponse(TypedDict, closed=True):
    entities: NotRequired["capo_comprehend.types.list_of_entities.ListOfEntities"]
    """<p>A collection of entities identified in the input text. For each entity, the response provides the entity text, entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection. </p> <p>If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-entities.html">Entities</a> in the Comprehend Developer Guide. </p>"""
    document_metadata: NotRequired[
        "capo_comprehend.types.document_metadata.DocumentMetadata"
    ]
    """<p>Information about the document, discovered during text extraction. This field is present in the response only if your request used the <code>Byte</code> parameter. </p>"""
    document_type: NotRequired[
        "capo_comprehend.types.list_of_document_type.ListOfDocumentType"
    ]
    """<p>The document type for each page in the input document. This field is present in the response only if your request used the <code>Byte</code> parameter. </p>"""
    blocks: NotRequired["capo_comprehend.types.list_of_blocks.ListOfBlocks"]
    """<p>Information about each block of text in the input document. Blocks are nested. A page block contains a block for each line of text, which contains a block for each word. </p> <p>The <code>Block</code> content for a Word input document does not include a <code>Geometry</code> field.</p> <p>The <code>Block</code> field is not present in the response for plain-text inputs.</p>"""
    errors: NotRequired["capo_comprehend.types.list_of_errors.ListOfErrors"]
    """<p>Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.</p>"""

blocks instance-attribute

blocks: NotRequired[ListOfBlocks]

Information about each block of text in the input document. Blocks are nested. A page block contains a block for each line of text, which contains a block for each word.

The Block content for a Word input document does not include a Geometry field.

The Block field is not present in the response for plain-text inputs.

document_metadata instance-attribute

document_metadata: NotRequired[DocumentMetadata]

Information about the document, discovered during text extraction. This field is present in the response only if your request used the Byte parameter.

document_type instance-attribute

document_type: NotRequired[ListOfDocumentType]

The document type for each page in the input document. This field is present in the response only if your request used the Byte parameter.

entities instance-attribute

entities: NotRequired[ListOfEntities]

A collection of entities identified in the input text. For each entity, the response provides the entity text, entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.

If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see Entities in the Comprehend Developer Guide.

errors instance-attribute

errors: NotRequired[ListOfErrors]

Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.