All Projects → fhamborg → NewsMTSC

fhamborg / NewsMTSC

Licence: other
Target-dependent sentiment classification in news articles reporting on political events. Includes a high-quality data set of over 11k sentences and a state-of-the-art classification model.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to NewsMTSC

Tensorflow Sentiment Analysis On Amazon Reviews Data
Implementing different RNN models (LSTM,GRU) & Convolution models (Conv1D, Conv2D) on a subset of Amazon Reviews data with TensorFlow on Python 3. A sentiment analysis project.
Stars: ✭ 34 (-37.04%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
Text tone analyzer
Система, анализирующая тональность текстов и высказываний.
Stars: ✭ 15 (-72.22%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
ML2017FALL
Machine Learning (EE 5184) in NTU
Stars: ✭ 66 (+22.22%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
Tia
Your Advanced Twitter stalking tool
Stars: ✭ 98 (+81.48%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
COVID-19-Tweet-Classification-using-Roberta-and-Bert-Simple-Transformers
Rank 1 / 216
Stars: ✭ 24 (-55.56%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
Dan Jurafsky Chris Manning Nlp
My solution to the Natural Language Processing course made by Dan Jurafsky, Chris Manning in Winter 2012.
Stars: ✭ 124 (+129.63%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
Context
ConText v4: Neural networks for text categorization
Stars: ✭ 120 (+122.22%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
Sentiment-analysis-amazon-Products-Reviews
NLP with NLTK for Sentiment analysis amazon Products Reviews
Stars: ✭ 37 (-31.48%)
Mutual labels:  sentiment-analysis, text-classification, sentiment-classification
german-sentiment-lib
An easy to use python package for deep learning-based german sentiment classification.
Stars: ✭ 33 (-38.89%)
Mutual labels:  sentiment-analysis, sentiment-classification
german-sentiment
A data set and model for german sentiment classification.
Stars: ✭ 37 (-31.48%)
Mutual labels:  sentiment-analysis, sentiment-classification
arabic-sentiment-analysis
Sentiment Analysis in Arabic tweets
Stars: ✭ 64 (+18.52%)
Mutual labels:  sentiment-analysis, sentiment-classification
brand-sentiment-analysis
Scripts utilizing Heartex platform to build brand sentiment analysis from the news
Stars: ✭ 21 (-61.11%)
Mutual labels:  sentiment-analysis, sentiment-classification
analyzing-reddit-sentiment-with-aws
Learn how to use Kinesis Firehose, AWS Glue, S3, and Amazon Athena by streaming and analyzing reddit comments in realtime. 100-200 level tutorial.
Stars: ✭ 40 (-25.93%)
Mutual labels:  sentiment-analysis, sentiment-classification
sarcasm-detection-for-sentiment-analysis
Sarcasm Detection for Sentiment Analysis
Stars: ✭ 21 (-61.11%)
Mutual labels:  sentiment-analysis, text-classification
sentiment analysis dict
sentiment analysis、情感分析、文本分类、基于字典、python、classification
Stars: ✭ 111 (+105.56%)
Mutual labels:  sentiment-analysis, sentiment-classification
Senti4SD
An emotion-polarity classifier specifically trained on developers' communication channels
Stars: ✭ 41 (-24.07%)
Mutual labels:  sentiment-analysis, sentiment-classification
cnn-text-classification
Text classification with Convolution Neural Networks on Yelp, IMDB & sentence polarity dataset v1.0
Stars: ✭ 108 (+100%)
Mutual labels:  text-classification, sentiment-classification
awesome-text-classification
Text classification meets word embeddings.
Stars: ✭ 27 (-50%)
Mutual labels:  sentiment-analysis, text-classification
TLA
A comprehensive tool for linguistic analysis of communities
Stars: ✭ 47 (-12.96%)
Mutual labels:  sentiment-analysis, text-classification
sentistrength id
Sentiment Strength Detection in Bahasa Indonesia
Stars: ✭ 32 (-40.74%)
Mutual labels:  sentiment-analysis, sentiment-classification

NewsMTSC: (Multi-)Target-dependent Sentiment Classification in News Articles

NewsMTSC is a dataset for target-dependent sentiment classification (TSC) on news articles reporting on policy issues. The dataset consists of more than 11k labeled sentences, which we sampled from news articles from online US news outlets. More information can be found in our paper published at the EACL 2021.

This repository contains the dataset for target-dependent sentiment classification in news articles reporting on policy issues. Additionally, the repository contains our model named GRU-TSC, which achieves state-of-the-art TSC classification performance on NewsMTSC. Check it out - it works out of the box :-)

Quick start

  • I want to classify sentiment: check out our easy-to-use, high-quality sentiment classifier on PyPI
  • I need the dataset: you can download it here or view it here. We also offer NewsMTSC as a dataset on Huggingface Hub and on Kaggle.
  • I want to train my own models: read the remainder of this file.

Installation

It's super easy, we promise! Note that following these instructions is only necessary if you're planning to train a model using our tool. If you only want to predict the sentiment of sentences, please use our Python package, which is even easier to install and use :-)

NewsMTSC was tested on MacOS and Ubuntu; other OS may work, too. Let us know :-)

1. Setup the environment:

This step is optional if you have Python 3.7 installed already (python --version). If you don't have Python 3.7, we recommend using Anaconda for setting up requirements. If you do not have it yet, follow Anaconda's installation instructions.

To setup a Python 3.7 environment (in case you don't have one yet) you may use, for example:

conda create --yes -n newsmtsc python=3.7
conda activate newsmtsc

FYI, for users of virtualenv, the equivalent command would be:

virtualenv -ppython3.7 --setuptools 45 venv
source venv/bin/activate

2. Setup NewsMTSC:

git clone [email protected]:fhamborg/NewsMTSC.git

Afterward, for example, open the project in your IDE and follow the instruction described in the section "Training".

Note that if you only want to classify sentiment using our model, we recommend that you use our PyPI package NewsSentiment. Getting it is as simple as pip install NewsSentiment and using it is four lines of code :-)

Training

If you want to train one of our models or your own model, please clone the repository first.

There are two entry points to the system. train.py is used to train and evaluate a specific model on a specific dataset using specific hyperparameters. We call a single run an experiment. controller.py is used to run multiple experiments automatically. This is for example useful for model selection and evaluating hundreds or thousands of combinations of models, hyperparameters, and datasets.

Running a single experiment

Goal: training a model with a user-defined (hyper)parameter combination.

train.py allows fine-grained control over the training and evaluation process, yet for most command line arguments we provide useful defaults. Two arguments are required:

  • --own_model_name (which model is used, e.g., grutsc),
  • --dataset_name (which dataset is used, e.g., newsmtsc-rw).

For more information refer to train.py and combinations_absadata_0.py. If you just want to get started quickly, the command below should work out of the box.

python train.py --own_model_name grutsc --dataset_name newsmtsc-rw

Running multiple experiments

Goal: finding the (hyper)parameter combination to train a model that achieves the best performance.

controller.py takes a set of values for each argument, creates combinations of arguments, applies conditions to remove unnecessary combinations (e.g., some arguments may only be used for a specific model), and creates a multiprocessing pool to run experiments of these argument combinations in parallel. After completion, controller.py creates a summary, which contains detailed results, including evaluation performance, of all experiments. By using createoverview.py, you can export this summary into an Excel spreadsheet.

Acknowledgements

This repository is in part based on ABSA-PyTorch. We thank Song et al. for making their excellent repository open source.

How to cite

If you use the dataset or model, please cite our paper (PDF):

@InProceedings{Hamborg2021b,
  author    = {Hamborg, Felix and Donnay, Karsten},
  title     = {NewsMTSC: (Multi-)Target-dependent Sentiment Classification in News Articles},
  booktitle = {Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics (EACL 2021)},
  year      = {2021},
  month     = {Apr.},
  location  = {Virtual Event},
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].