A walkthrough of how to install OpinionFinder 1.5.

Overview

For my social media mining project on twitter sentiment aggregation I need a working version of University of Pittsburgh’s Opinion Finder 1.5.

I went to the website here: http://www.cs.pitt.edu/mpqa/opinionfinder_1.html and requested version 1.5.

First unpackage the download and enter the directory:

tar -zxvf opinionfinder.tar.gz
cd opinionfinder

Installing Sundance

The first part of the install is installing sundance

To do this you’ll need csh

sudo aptitude install csh
cd software/
tar -zxvf sundance-4.37
cd sundance-4.37/include

Open sunstr.C and uncomment the line

/* #include <stdlib.h> */

Open sunstr.h and edit the following include line:

#include <string>

to be

#include <string.h>

Then go to this site (at the bottom of the page) and download the hash.h file here. Replace the current hash.h file (in the /include) with the one you just downloaded.

Lastly, compile the file:

cd ../scripts
./install_script

That was what was necessary for me.

Installing scol1k

Next you need to install scol1k

cd software/
tar -zxvf scol1k.tgz
cd scol1k.tgz
cd tools

edit select.c and change line 84:

target = *((int *)lines)++; 

to be

target = (*((int *)lines))++;

Then return to the home directory for scol1k and compile:

cd ..
./configure
make
make install

I received some error at the end of running the make command (the make file ran reg on the e8.reg file and got a seg fault).

I ignored this and ran make install anyways… because I think only the stemmer is being used by opinion finder.

Installing Boostexter2.1

Next I moved on to installing BoosTexter 2.1 which I got here. I was able to get the i386 binary for boostexter2.1 and it ran without any problems

Installing Wordnet 1.6

Lastly, I had to get a copy of Wordnet 1.6 here.

It was pretty easy to install

cd wordnet-1.6/

edit the make file for your distribution (uncomment the appropriate line):

#platform=linux

becomes

platform=linux

Then I ran the make script to install the binaries:

sudo make BinWorld

Installing Sundance Apps

cd software
tar -zxvf sundance_apps-4.37
cd sundance_apps-4.37

Then I edited the make file to include the proper path to the sundance directory.

then I installed it:

make autoannotate

Installing Opinion Finder

Edit the config.txt file in the opinion finder directory to point to all of the software packages we just installed.

Lastly, run the install script:

python install.py config.txt

Running Opinion Finder

I followed the directions in the README

I copied the files in the examples into the database/docs folder

cp -R ./examples/marktwain ./database/docs

then I edited the twain.doclist file to have the appropriate path for each file

then I ran opinionfinder command in the opinionfinder directory:

python opinionfinder.py -f ./examples/twain.doclist

That’s it! Best of Luck