sentiment-package: Sentimental text analysis in R

Description Author(s) References Examples

Description

Sentiment text analysis tool in R without no NLP compoment installation. It uses sentiment140 web service engine through internet, provides instant negative, positive, neutral text expression recognition, tune to Twitter text analysis.

It supports English and Spanish ONLY at this time!

Author(s)

chris okugami Maintainer: chris.okugami <chris.okugami@csiro.au>

References

sentiment140 API docuementation http://help.sentiment140.com/for-students

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# ++ possitive expression example ++
sentiment('I love my apple')

#             text polarity language
#1 I love my apple positive       en

# ++ negative expression example ++
sentiment('I hate my apple')


RESULT=sentiment(c('I hate my apple','I love my apple')) 

#             text polarity language
#1 I hate my apple negative       en
#2 I love my apple positive       en

#> table(RESULT$polarity)
#negative  positive 
#      1         1 
      
# Batch processing example 
data(twitter)
head(key.1$text)
x<-sentiment(key.1$text)

okugami79/sentiment140 documentation built on May 24, 2019, 12:51 p.m.