detect_sentiment {aws.comprehend} | R Documentation |
Detect sentiment in a source text
Description
Detect sentiment in a source text
Usage
detect_sentiment(text, language = "en", ...)
Arguments
text |
A character string containing a text to sentiment analyze, or a character vector to perform analysis separately for each element. |
language |
A character string containing a two-letter language code. Currently “en” and “es” are supported. |
... |
Additional arguments passed to |
Value
A data frame
Examples
## Not run:
# simple example
detect_sentiment("I have never been happier. This is the best day ever.")
txt <-c("I have never been happier. This is the best day ever.",
"I have always been happier. This is the worst day ever.")
detect_sentiment(txt)
## End(Not run)
[Package aws.comprehend version 0.2.1 Index]