GithubHelp home page GithubHelp logo

crl-ick / multitask_negation_for_sa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ltgoslo/multitask_negation_for_sa

0.0 0.0 0.0 7.97 MB

Improving Sentiment Analysis with Multi-task Learning of Negation

Python 60.42% Perl 39.58%

multitask_negation_for_sa's Introduction

Improving Sentiment Analysis with Multi-task Learning of Negation

This repo accompanies the paper by the same name published in Natural Language Engineering (Volume 27, Issue 2) 2020, by
Jeremy Barnes, Lilja Øvrelid, and Erik Velldal. Pre-print available on arXiv.

Summary

Sentiment analysis is directly affected by compositional phenomena in language that act on the prior polarity of the words and phrases found in the text. Negation is the most prevalent of these phenomena and in order to correctly predict sentiment, a classifier must be able to identify negation and disentangle the effect that its scope has on the final polarity of a text. This paper proposes a multi-task approach to explicitly incorporate information about negation in sentiment analysis, which we show outperforms learning negation implicitly in a data-driven manner. We describe our approach, a cascading neural architecture with selective sharing of LSTM layers, and show that explicitly training the model with negation as an auxiliary task helps improve the main task of sentiment analysis. The effect is demonstrated across several different standard English-language datasets for both tasks and we analyze several aspects of our system related to its performance, varying types and amounts of input data and different multi-task setups.

Models

  1. Single-task model
  2. Multi-task SFU
  3. Multi-task CD
  4. Transfer-learning

Datasets

  1. SST
  2. SemEval 2013 SA task
  3. SFU Review Corpus
  4. Conan Doyle Neg (*Sem 2012)
  5. Streusle Dataset

Embeddings

You can find the embeddings used in the experiments here. Untar the file and use the 'google.txt' embeddings.

Requirements

  1. Python 3
  2. sklearn pip install -U scikit-learn
  3. Pytorch pip install torch torchvision torchtext
  4. nltk pip install nltk
  5. matplotlib pip install matplotlib
  6. tqdm pip install tqdm

multitask_negation_for_sa's People

Contributors

jerbarnes avatar erikve avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.