Giter Club home page Giter Club logo

mams-for-absa's Introduction

MAMS-for-ABSA

This repository contains the data and code for the paper "A Challenge Dataset and Effective Models for Aspect-Based Sentiment Analysis", EMNLP-IJCNLP 2019, [paper].

MAMS

MAMS is a challenge dataset for aspect-based sentiment analysis (ABSA), in which each sentences contain at least two aspects with different sentiment polarities. MAMS dataset contains two versions: one for aspect-term sentiment analysis (ATSA) and one for aspect-category sentiment analysis (ACSA).

Requirements

pytorch==1.1.0
spacy==2.1.8
pytorch-pretrained-bert==0.6.2
adabound==0.0.5
pyyaml==5.1.2
numpy==1.17.2
scikit-learn==0.21.3
scipy==1.3.1

Quick Start

Put the pretrained GloVe(http://nlp.stanford.edu/data/wordvecs/glove.840B.300d.zip) file glove.840B.300d.txt in folder ./data. Modify config.py to select task, model and hyper-parameters. When mode is set to term, base_path should point to an ATSA dataset. When mode is set to category, base_path should point to an ACSA dataset.

Preprocessing

python preprocess.py

Train

python train.py

Test

python test.py

Acknowledgement

The BERT model pretrained by huggingface(https://github.com/huggingface/pytorch-transformers) is used in our experiments.

mams-for-absa's People

Contributors

jiangqn avatar

Stargazers

 avatar

Forkers

howardcorleone

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.