https://github.com/andrie/sentiment
[R] package to perform sentiment analysis
https://github.com/andrie/sentiment
Last synced: 2 months ago
JSON representation
[R] package to perform sentiment analysis
- Host: GitHub
- URL: https://github.com/andrie/sentiment
- Owner: andrie
- Created: 2012-06-24T21:56:11.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-04T08:07:35.000Z (almost 12 years ago)
- Last Synced: 2023-03-11T11:48:22.051Z (about 2 years ago)
- Language: R
- Size: 123 KB
- Stars: 12
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sentiment
An [R] package to perform (naive) sentiment analysis by scoring individual words, based on the affinity score defined by [AFINN] (http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010)
## Install package from github
install.packages("devtools")
library("devtools")
install_github("sentiment", "andrie")## Sentiment analysis on strings:
sentiment(c("There is a terrible mistake in this work", "This is wonderful!"))
## Sentiment analysis on twitteR data:if(require(twitter)){
library(twitteR)
tweets <- searchTwitter("#mcdonalds", n=25)
sentiment(tweets[[1]])
sapply(tweets, sentiment)
}