Code and datasets of our paper "SSEGCN: Syntactic and Semantic Enhanced Graph Convolutional Network for Aspect-based Sentiment Analysis" accepted by NAACL 2022.
- 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 intoSSEGCN/glove
directory. -
Prepare dataset with:
python preprocess_data.py
-
Prepare vocabulary with:
sh build_vocab.sh
To train the SSEGCN model, run:
sh run.sh
The code and datasets in this repository are based on DualGCN_ABSA .