Skip to content

DetectEntities

Source: src/AWS/Comprehend/DetectEntities.ts

Runtime binding for comprehend:DetectEntities — detect named entities (people, places, organizations, dates, quantities, …) in the input text using the pre-trained model, or custom entities via a custom entity recognizer endpoint (EndpointArn).

The binding takes no arguments and grants the action on * (the action has no resource-level IAM for the pre-trained model).

// init
const detectEntities = yield* AWS.Comprehend.DetectEntities();
// runtime
const result = yield* detectEntities({
Text: "Bob moved to Seattle in 2017.",
LanguageCode: "en",
});
// result.Entities: [{ Type: "PERSON", Text: "Bob" }, { Type: "LOCATION", Text: "Seattle" }, …]