Provides information about an entity.

interface Entity {
    BeginOffset?: number;
    BlockReferences?: BlockReference[];
    EndOffset?: number;
    Score?: number;
    Text?: string;
    Type?: string;
}

Properties

BeginOffset?: number

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.

BlockReferences?: BlockReference[]

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

EndOffset?: number

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?: number

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

Text?: string

The text of the entity.

Type?: string

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.