Last data update: 2014.03.03

R: Estimates the sentiment of some text
text2sentimentR Documentation

Estimates the sentiment of some text

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

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

	## Not run: 
		text2sentiment("I love this hotel!")
	
## End(Not run)

Results