sentiment_hq: Returns a scalar estimate of the sentiment of the text

Description Usage Arguments Value See Also Examples

Description

Given input text, returns a scalar estimate of the sentiment of that text.

Usage

1

Arguments

text

text for analysis

version

for api version

...

additional arguments to passed to request

Value

Numerical value roughly in the range from 0 to 1 with 0.5 indicating neutral sentiment. For reference, 0 suggests very negative sentiment and 1 suggests very positive sentiment.

See Also

political, language

Examples

1
2
3
4
5
emotion <- sentiment_hq("Thanks everyone for the birthday wishes!!
                      It was a crazy few days ><")
emotion
cat(sprintf("This text has %s tonality",
             ifelse(emotion > 0.5, "positive", "negative")))

IndicoDataSolutions/IndicoIo-R documentation built on May 7, 2019, 6:37 a.m.