Skip to main content

Target Dependent Sentiment Analysis (TDSA) framework.

Project description

Bella

Build Status

Target Dependent Sentiment Analysis (TDSA) framework.

Requirements and Installation

  1. Python 3.6
  2. pip install bella-tdsa
  3. Install docker
  4. Start Stanford CoreNLP server: docker run -p 9000:9000 -d --rm mooreap/corenlp
  5. Start the TweeboParser API server: docker run -p 8000:8000 -d --rm mooreap/tweeboparserdocker

To stop the docker servers running:

  1. Find the name assigned to the docker image using: docker ps
  2. Then stop the relevant docker image: docker stop name_of_image

NOTE Both of these servers will run with as many threads as your machine has CPUs to limit this do the following:

  1. For stanford: docker run -p 9000:9000 -d --rm mooreap/corenlp -threads 6 will run it with 6 threads
  2. For TweeboParser: docker run -p 8000:8000 -d --rm mooreap/tweeboparserdocker --threads 6 will run it with 6 threads

Dataset

All of the dataset are required to be downloaded and are not stored in this repository. We recomend using the config file to state where the datasets are stored like we did but this is not a requirement as you can state where they are stored explictly in the code. For more details on the datasets and downloading them see the dataset notebook The datasets used:

  1. SemEval 2014 Resturant dataset. We used Train dataset version 2 and the test dataset.
  2. SemEval 2014 Laptop dataset. We used Train dataset version2 and the test dataset.
  3. Election dataset
  4. Dong et al. Twitter dataset
  5. Youtubean dataset by Marrese-Taylor et al.
  6. Mitchell dataset which was released with this paper.

NOTE Before using Mitchell and YouTuBean datasets please go through these pre-processing notebooks: Mitchell YouTuBean for splitting their data and also in Mitchell case which train test split to use.

Lexicons

These lexicons are required to be downloaded if you use any methods that require them. Please see the use of the config file for stroing the location of the lexicons:

  1. MPQA can be found here
  2. NRC here
  3. Hu and Liu here

Word Vectors

All the word vectors are automatically downloaded for you and they are stored in the root directory called '.Bella' which is created in your user directory e.g. on Linux that would be ~/.Bella/. The word vectors included in this repository are the following:

  1. SSWE
  2. Word Vectors trained on sentences that contain emojis
  3. Glove Common Crawl
  4. Glove Twitter
  5. Glove Wiki Giga

Model Zoo

The model zoo can be found in the "model zoo" folder.

The notebooks

Can be found here

The best order to look at the notebooks is first look at the data with this notebook. Then looking at the notebook that describes how to load and use the saved models from the model zoo. Then go and explore the rest if you would like:

  1. The Mass evaluation notebooks are the following
  2. For the analysis of the reproduction of the Target Dependent model of Vo and Zhang see this notebook
  3. For the analysis of the reproduction of the TDParse model of Wang et al. see this notebook
  4. For the analysis of the reproduction of the LSTM models of Tang et al. see this notebook
  5. For the statistics of the datasets and where to find them see this notebook
  6. For the code on creating training and test splits for the YouTuBean dataset see this notebook
  7. For the code on creating training and test splits for Mitchell et al. dataset see this notebook

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bella_tdsa-0.1.0.tar.gz (65.5 kB view hashes)

Uploaded Source

Built Distribution

bella_tdsa-0.1.0-py3-none-any.whl (76.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page