Code and datasets of our paper: A Multi-Affine Fusion Graph Convolutional Network for Aspect-based Sentiment Analysis.
- Python 3.6.7
- PyTorch 1.2.0
- NumPy 1.17.2
- GloVe pre-trained word vectors:
- Download pre-trained word vectors here.
- Put glove.840B.300d.txt into the
dataset/glove/
folder.
Training the model:
python train.py --dataset [dataset]
Prepare vocabulary files for the dataset:
python prepare_vocab.py --dataset [dataset]
Evaluate trained model
python eval.py --model_dir [model_file path]
The code and datasets in this repository are based on DM-GCN_ABSA . Dynamic and Multi-Channel Graph Convolutional Network for Aspect-Based Sentiment Analysis.
I mainly changed the models folder, but also a small part of train.py.