Skip to content

DetectKeyPhrases

Source: src/AWS/Comprehend/DetectKeyPhrases.ts

Runtime binding for comprehend:DetectKeyPhrases — extract the key noun phrases of the input text with confidence scores and offsets.

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

// init
const detectKeyPhrases = yield* AWS.Comprehend.DetectKeyPhrases();
// runtime
const result = yield* detectKeyPhrases({
Text: "The quarterly earnings report exceeded analyst expectations.",
LanguageCode: "en",
});
// result.KeyPhrases: [{ Text: "The quarterly earnings report" }, …]