This repo contains code for NAACL 2021 paper titled Does syntax matter? A strong baseline for Aspect-based Sentiment Analysis with RoBERTa.
The summarized information is here:
For any questions about the implementation, feel free to create an issue or email me via [email protected].
I have received some questions about the reproduction issues. After the re-check of the code and some discussions, we conjecture that the problem may be caused by the different usage of RoBERTa Tokenizer and some pre-processing. We release the datasets in the Dataset
folder.
To get our RoBERTa results, simply run the finetune.py
in Train
folder. Before the code running, make sure the --data_dir
and --dataset
arguments are filled in correct file path.
- This section is for the reproduction of experiments in the original paper; for the reproduction of RoBERTa SOTA results in Paperwithcode, please refer to the next section.
- Fine-tuning the model on ABSA datasets using the code from the
Train
folder, which will save the fine-tuned models. - Generate the induced trees using the code from the
Perturbed-Masking
folder, which will output the input datasets for different models. - Run the code in
ASGCN
,PWCN
andRGAT
.
We made necessary changes based on the original code. We believe all the changes are under the MIT License permission. And we opensource all the changes we have made.