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).
Real-Time Analysis
Section titled “Real-Time Analysis”// initconst detectTargetedSentiment = yield* AWS.Comprehend.DetectTargetedSentiment();
// runtimeconst result = yield* detectTargetedSentiment({ Text: "The screen is gorgeous but the battery life is disappointing.", LanguageCode: "en",});// result.Entities[…].Mentions[…].MentionSentiment.Sentiment