detect_sentiment: Detect sentiment in a source text

Description Usage Arguments Value Examples

View source: R/detect_sentiment.R

Description

Detect sentiment in a source text

Usage

1

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 comprehendHTTP.

Value

A data frame

Examples

1
2
3
4
5
6
7
8
9
## 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)

cloudyr/aws.comprehend documentation built on March 25, 2020, 4:35 p.m.