text2sentiment: Estimates the sentiment of some text

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function analyzes the text for words that correlate with complimentary or derogatory reviews and comments, to give an overall score for how positive or negative the text is about its subject.

Usage

1
text2sentiment(text, session=getCurlHandle())

Arguments

text

A short piece of writing, from a sentence to a paragraph in length for best results.

session

This is the CURLHandle object giving the structure for the options and that will process the command. For curlMultiPerform, this is an object of class code MultiCURLHandle-class.

Value

score

A number representing the estimated sentiment, from -5 (very negative) to +5 (very positive).

Author(s)

Ryan Elmore

References

http://www.datasciencetoolkit.org/developerdocs#text2sentiment

See Also

curlPerform, getCurlHandle, dynCurlReader

Examples

1
2
3
4
	## Not run: 
		text2sentiment("I love this hotel!")
	
## End(Not run)

RDSTK documentation built on May 2, 2019, 6:49 a.m.