Installing Weka

Download the latest stable version or the developer branch of Weka. You can also build the developer branch from the SVN repository:

# checkout weka 
svn co
# build weka using apache ant
ant -f weka/build.xml exejar

Installing AffectiveTweets

Install AffectiveTweets1.0.1 using the WekaPackageManager:

java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package AffectiveTweets

Make sure you have installed version 1.0.1 to run the examples.

In case of having problems with the Weka packages repository, install the package as follows:

java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package

Building AffectiveTweets

You can also build the package from the Github version to try the most recent features. This is very useful if you want to modify the code or contribute with a new feature.

# clone the repository
git clone
cd AffectiveTweets

# Download additional files

# Build the package using apache ant
ant -f build_package.xml make_package

# Install the built package 
java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package dist/

Other Useful Packages

We recommend installing other useful packages for classification, regression and evaluation:

java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package LibLINEAR
java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package LibSVM
java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package RankCorrelation
  • Snowball-stemmers: This package allows using the Porter stemmer as well as other Snowball stemmers.
java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package snowball-stemmers
  • The WekaDeepLearning4j package can be installed for training deep neural networks and word embeddings.