Skip to content

Entity

Source code in docs_src/capo_comprehend/types/entity.py
class Entity(TypedDict, closed=True):
    score: NotRequired["capo_comprehend.types.float.Float"]
    """<p>The level of confidence that Amazon Comprehend has in the accuracy of the detection.</p>"""
    type: NotRequired["capo_comprehend.types.entity_type.EntityType"]
    """<p>The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.</p> <p>For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.</p>"""
    text: NotRequired["capo_comprehend.types.string.String"]
    """<p>The text of the entity.</p>"""
    begin_offset: NotRequired["capo_comprehend.types.integer.Integer"]
    """<p>The zero-based offset from the beginning of the source text to the first character in the entity.</p> <p>This field is empty for non-text input.</p>"""
    end_offset: NotRequired["capo_comprehend.types.integer.Integer"]
    """<p>The zero-based offset from the beginning of the source text to the last character in the entity.</p> <p>This field is empty for non-text input.</p>"""
    block_references: NotRequired[
        "capo_comprehend.types.list_of_block_references.ListOfBlockReferences"
    ]
    """<p>A reference to each block for this entity. This field is empty for plain-text input.</p>"""

begin_offset instance-attribute

begin_offset: NotRequired[Integer]

The zero-based offset from the beginning of the source text to the first character in the entity.

This field is empty for non-text input.

block_references instance-attribute

block_references: NotRequired[ListOfBlockReferences]

A reference to each block for this entity. This field is empty for plain-text input.

end_offset instance-attribute

end_offset: NotRequired[Integer]

The zero-based offset from the beginning of the source text to the last character in the entity.

This field is empty for non-text input.

score instance-attribute

score: NotRequired[Float]

The level of confidence that Amazon Comprehend has in the accuracy of the detection.

text instance-attribute

text: NotRequired[String]

The text of the entity.

type instance-attribute

type: NotRequired[EntityType]

The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.

For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.