Code Monkey home page Code Monkey logo

ahrgat's Introduction

Aspect-Specific Heterogeneous Relational Graph Attention Neural Networks for Aspect-Based Sentiment Analysis

This repository contains the code from the paper "Investigating Typed Syntactic Dependencies for Targeted Sentiment Classification Using Graph Attention Neural Network", IEEE/ACM Transactions on Audio, Speech, and Language Processing (TASLP)

Setup

This code runs Python 3.6 with the following libraries:

  • Pytorch 1.2.0
  • Transformers 2.9.1
  • GTX 1080 Ti

You can also create an virtual environments with conda by run

conda env create -f requirements.yaml

Get start

  1. Prepare data

    • Restaurants, Laptop, Tweets and MAMS dataset. (We provide the parsed data at directory dataset)

    • Downloading Glove embeddings (available at here), then run

      awk '{print $1}' glove.840B.300d.txt > glove_words.txt
      

      to get glove_words.txt.

  2. Build vocabulary

    bash build_vocab.sh
    
  3. Training Go to Corresponding directory and run scripts:

    bash run-MAMS-glove.sh
    bash run-MAMS-BERT.sh
    
  4. The saved model and training logs will be stored at directory saved_models

References

@ARTICLE{bai21syntax,  
	author={Xuefeng Bai and Pengbo Liu and Yue Zhang},  
	journal={IEEE/ACM Transactions on Audio, Speech, and Language Processing},   
	title={Investigating Typed Syntactic Dependencies for Targeted Sentiment Classification Using Graph Attention Neural Network},   
	year={2021},  
	volume={29}, 
	pages={503-514},  
	doi={10.1109/TASLP.2020.3042009}
}

ahrgat's People

Contributors

goodbai-nlp avatar pengboliu avatar wuharlem 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.