get_sentiment: Sentiment Analysis

Description Usage Arguments Value See Also Examples

Description

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.

Usage

1

Arguments

text

The text to be analyzed.

language

The language of the text being analyzed. Must be en, es, fr, or pt.

Value

Returns the sentiment score, between 0 and 1 of the text. A data frame is returned containing the original text and the sentiment score.

See Also

https://www.microsoft.com/cognitive-services

Examples

1
2
3
get_sentiment("I am very angry")
get_sentiment("je suis tres en colere", language = "fr")
get_sentiment(c(sentence1, sentence2, sentence3))

dereklegenzoff/cognitiver documentation built on May 5, 2019, 3:49 a.m.