Analyzes the positive and negative sentiment expressed by the input. The response contains sentiment analysis results.

ros_sentiment(content, genre = NULL, language = NULL)

Arguments

content
either a URI or character vector of content to process
genre
document genre (optional)
language
Language: ISO 639-3 code (optional)

Examples

txt <- c("Original Ghostbuster Dan Aykroyd, who also co-wrote the 1984 Ghostbusters ", "film, couldn’t be more pleased with the new all-female Ghostbusters cast, ", "telling The Hollywood Reporter, “The Aykroyd family is delighted by this ", "inheritance of the Ghostbusters torch by these most magnificent women in comedy.") ros_sentiment(paste0(txt, collapse=""))
#> $document #> $document$label #> [1] "pos" #> #> $document$confidence #> [1] 0.7962072 #> #> #> $entities #> type mention normalized count entityId #> 1 PERSON Dan Aykroyd Dan Aykroyd 2 Q105221 #> 2 ORGANIZATION Hollywood Reporter Hollywood Reporter 1 Q61503 #> sentiment.label sentiment.confidence #> 1 pos 0.6385089 #> 2 pos 0.5338094 #> #>