Investigating Typed Syntactic Dependencies for Targeted Sentiment Classification Using Graph Attention Neural Network
This repository contains the code for 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)
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
-
Prepare data
- Restaurants, Laptop, Tweets and MAMS dataset. (We provide the parsed data at directory
dataset
) - Glove embeddings (available at here)
- Restaurants, Laptop, Tweets and MAMS dataset. (We provide the parsed data at directory
-
Build vocabulary
bash build_vocab.sh
-
Training Go to Corresponding directory and run scripts:
bash run-MAMS-glove.sh bash run-MAMS-BERT.sh
-
The saved model and training logs will be stored at directory
saved_models
Unavailable now.