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 https://svn.cms.waikato.ac.nz/svn/weka/trunk/weka/
# build weka using apache ant
ant -f weka/build.xml exejar

Installing AffectiveTweets

Install AffectiveTweets1.0.0 using the WekaPackageManager:

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

In order to properly run our examples, we recommend installing the newest version of the package v.1.0.1 (not officially released yet) as follows:

# Uninstall the previous version of AffectiveTweets
java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -uninstall-package AffectiveTweets
# Install the newest development version:
java -cp $WEKA_PATH/weka.jar weka.core.WekaPackageManager -install-package https://github.com/felipebravom/AffectiveTweets/releases/download/1.0.1/AffectiveTweets1.0.1.zip

Building AffectiveTweets

You can also build the package from the repository's version to try the most recent features. This is very useful if you want to contribute.

# clone the repository
git clone https://github.com/felipebravom/AffectiveTweets.git
cd AffectiveTweets

# Download additional files
wget https://github.com/felipebravom/AffectiveTweets/releases/download/1.0.1/extra.zip
unzip extra.zip

# 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/AffectiveTweets.zip


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 https://github.com/fracpete/snowball-stemmers-weka-package/releases/download/v1.0.1/snowball-stemmers-1.0.1.zip
  • The WekaDeepLearning4j package can be installed for training deep neural networks and word embeddings.