Description Usage Arguments Value See Also Examples
Analyzes the sentiment of a string of text and returns a value between 0 and 1. This function is a wrapper for the sentiment get request in Microsoft's Cognitive Services API.
1 | get_sentiment(text, language = "en")
|
text |
The text to be analyzed. |
language |
The language of the text being analyzed. Must be en, es, fr, or pt. |
Returns the sentiment score, between 0 and 1 of the text
.
A data frame is returned containing the original text and the sentiment score.
https://www.microsoft.com/cognitive-services
1 2 3 | get_sentiment("I am very angry")
get_sentiment("je suis tres en colere", language = "fr")
get_sentiment(c(sentence1, sentence2, sentence3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.