Installation

To run this module, you will need to do the following:

  • Clone the repository
  • Install requirements
  • Install the module
  • Install the assets

Clone the repository

cd ~
git clone git@bitbucket.org:catdevrandom/lingtools.git

Install requirements

Make sure you have the requisites installed. You can use the file requirements.txt to install the dependences using pip:

cd ~/lingtools
pip install -r requirements.txt

Prerequisites

Software:

  • Python 2.7 (it might work with Python 3, but it has not been tested).

Python packages:

See file requirements.txt, in the root of the repository.

NLTK data (in a place where NLTK can find it, e.g. ~/nltk_data):

  • maxent_ne_chunker
  • brown
  • sentiwordnet
  • stopwords
  • wordnet
  • words
  • vader_lexicon
  • averaged_perceptron_tagger
  • maxent_treebank_pos_tagger
  • punkt

Assets (see section Install assets):

  • ANEW database
  • MRC2 database
  • LSA model trained on the TASA corpus

Install module

You can use the setup.py script. For that, you need the module setuptools to be installed:

pip install setuptools
python setup.py install

Install assets

The assets are not distributed with the code. To be able to use the software, you need to download the assets and unzip the file in the assets folder:

cd ~/.lingtools
wget https://surfdrive.surf.nl/files/index.php/s/2FVDToX8NwmhHpr/download -O assets.zip
unzip assets.zip

Running the tests

You can run the test suit to make sure the installation works. This software uses the built-in module unittest:

cd tests
./runtests.sh