Skip to main content

Detect sentiment

Read whether a text is positive, negative, neutral or mixed, with a score for each (Amazon Comprehend).

Command in the AWS AI services toolkit · id ooa.aws_ai/comprehend_sentiment · 3 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
SessionStringNoaws_aiName of the session opened by Connect.
TextStringYesThe text to read, at most 5,000 bytes.
LanguageStringNoenLanguage of the text, e.g. en, es, fr, de, it, pt, ja, ko, zh, ar or hi.

Outputs​

OutputTypeWhat it is
sentimentStringPOSITIVE, NEGATIVE, NEUTRAL or MIXED.
scoresDictionaryScore from 0 to 1 for each, e.g. {"positive": 0.97, "negative": 0.01, "neutral": 0.02, "mixed": 0}.