Code and datasets of our paper “Aspect-based Sentiment Analysis with Attention-assisted Graph and Variational Sentence Representation”
- torch==1.4.0
- scikit-learn==0.23.2
- transformers==3.2.0
- cython==0.29.13
- nltk==3.5
To install requirements, run pip install -r requirements.txt
.
-
Download and unzip GloVe vectors(
glove.840B.300d.zip
) from https://nlp.stanford.edu/projects/glove/ and put it intoVAGR/glove
directory. -
Prepare vocabulary with:
sh VAGR/build_vocab.sh
To train the C3DA model, run:
sh VAGR/run.sh
Logs are saved under VAGR/VAGR/log
The code and datasets in this repository are based on ABSA-PyTorch and CDT_ABSA.
@article{feng2022aspect,
author = {Shi Feng and Bing Wang and Zhiyao Yang and Jihong Ouyang},
title = {Aspect-based sentiment analysis with attention-assisted graph and variational sentence representation},
journal = {Knowledge-Based Systems},
volume = {258},
pages = {109975},
year = {2022},
url = {https://doi.org/10.1016/j.knosys.2022.109975},
doi = {10.1016/j.knosys.2022.109975},
timestamp = {Wed, 16 Nov 2022 21:55:11 +0100},
biburl = {https://dblp.org/rec/journals/kbs/FengWYO22.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}