Skip to content

DetectTargetedSentiment

Source: src/AWS/Comprehend/DetectTargetedSentiment.ts

Runtime binding for comprehend:DetectTargetedSentiment — analyze the sentiment expressed toward each entity mentioned in the input text (entity-level sentiment rather than whole-document sentiment).

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

// init
const detectTargetedSentiment = yield* AWS.Comprehend.DetectTargetedSentiment();
// runtime
const result = yield* detectTargetedSentiment({
Text: "The screen is gorgeous but the battery life is disappointing.",
LanguageCode: "en",
});
// result.Entities[…].Mentions[…].MentionSentiment.Sentiment