Skip to content

Instantly share code, notes, and snippets.

View vaelma's full-sized avatar

Sakari Vaelma vaelma

View GitHub Profile
@Inpirical-Coder
Inpirical-Coder / twttr_sentiment_bench.R
Created November 26, 2014 00:45
Benchmarking sentiment scoring algorithms for twitter using precision, recall, F-measure
# Short scripts for testing three different sentiment classifiers on tweets,
# acquiring the tweets used for testing,
# calculating systems' precision, recall and F-measures.
require(RCurl) # For downloading file from a given URL.
require(twitteR) # Used for the 'twitter' class.
require(sentiment) # For bayes and voter classifiers.
source("sent140.R") # Used for the Sentiment 140 API. Can be downloaded from here:
# https://github.com/okugami79/sentiment140/blob/master/R/sentiment.r