Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

comprehend_detect_sentiment

Inspects text and returns an inference of the prevailing sentiment (POSITIVE, NEUTRAL, MIXED, or NEGATIVE)


Description

Inspects text and returns an inference of the prevailing sentiment (POSITIVE, NEUTRAL, MIXED, or NEGATIVE).

Usage

comprehend_detect_sentiment(Text, LanguageCode)

Arguments

Text

[required] A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.

LanguageCode

[required] The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.

Value

A list with the following syntax:

list(
  Sentiment = "POSITIVE"|"NEGATIVE"|"NEUTRAL"|"MIXED",
  SentimentScore = list(
    Positive = 123.0,
    Negative = 123.0,
    Neutral = 123.0,
    Mixed = 123.0
  )
)

Request syntax

svc$detect_sentiment(
  Text = "string",
  LanguageCode = "en"|"es"|"fr"|"de"|"it"|"pt"|"ar"|"hi"|"ja"|"ko"|"zh"|"zh-TW"
)

paws.machine.learning

Amazon Web Services Machine Learning Services

v0.1.11
Apache License (>= 2.0)
Authors
David Kretch [aut, cre], Adam Banker [aut], Amazon.com, Inc. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.