Grid Tagging Scheme for Aspect-oriented Fine-grained Opinion Extraction. Zhen Wu, Chengcan Ying, Fei Zhao, Zhifang Fan, Xinyu Dai, Rui Xia. In Findings of EMNLP, 2020.
❗Note: Our opinion triplet datasets are completely from alignments of our previous work TOWE datasets and the original SemEval 2014, 2015, 2016 datasets. GTS datasets contain the cases of one aspect term corresponding to multiple opinion terms and one opinion term corresponding to multiple aspect terms.
[Data] [Pre-trained Model(from huggingface)]. Data format descriptions are here.
See requirement.txt or Pipfile for details
- pytorch==1.7.1
- transformers==3.4.0
- python=3.6
For example, you can use the folowing command to fine-tune Bert on the OPE task (the pre-trained Bert model is saved in the folder "pretrained/"):
python main.py --task pair --mode train --dataset res14
The best model will be saved in the folder "savemodel/".
For example, you can use the folowing command to test Bert on the OPE task:
python main.py --task pair --mode test --dataset res14
Note: In our pre-experiments, a smaller batch size and learning rate can achieve better performance on certain datasets, while we use a general setting in our paper to save time instead of adopting grid search.
GTS performance on opinion pair extraction (OPE) datasets:
Methods | 14res | 14lap | 15res | 16res | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | |
GTS-CNN | 74.13 | 69.49 | 71.74 | 68.33 | 55.04 | 60.97 | 66.81 | 61.34 | 63.96 | 70.48 | 72.39 | 71.42 |
GTS-BiLSTM | 71.32 | 67.07 | 69.13 | 61.53 | 54.31 | 57.69 | 67.76 | 63.19 | 65.39 | 70.32 | 70.46 | 70.39 |
GTS-BERT | 76.23 | 74.84 | 75.53 | 66.41 | 64.95 | 65.67 | 66.40 | 68.71 | 67.53 | 71.70 | 77.79 | 74.62 |
GTS performance on opinion triplet extraction (OTE) datasets:
Methods | 14res | 14lap | 15res | 16res | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | |
GTS-CNN | 70.79 | 61.71 | 65.94 | 55.93 | 47.52 | 51.38 | 60.09 | 53.57 | 56.64 | 62.63 | 66.98 | 64.73 |
GTS-BiLSTM | 67.28 | 61.91 | 64.49 | 59.42 | 45.13 | 51.30 | 63.26 | 50.71 | 56.29 | 66.07 | 65.05 | 65.56 |
GTS-BERT | 70.92 | 69.49 | 70.20 | 57.52 | 51.92 | 54.58 | 59.29 | 58.07 | 58.67 | 68.58 | 66.60 | 67.58 |
GTS performance on ASTE-Data-V2 datasets:
Methods | 14res | 14lap | 15res | 16res | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | |
GTS-BERT | 68.71 | 67.67 | 68.17 | 58.54 | 50.65 | 54.30 | 60.69 | 60.54 | 60.61 | 67.39 | 66.73 | 67.06 |
If you used the datasets or code, please cite our paper:
@inproceedings{wu-etal-2020-grid,
title = "Grid Tagging Scheme for Aspect-oriented Fine-grained Opinion Extraction",
author = "Wu, Zhen and
Ying, Chengcan and
Zhao, Fei and
Fan, Zhifang and
Dai, Xinyu and
Xia, Rui",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2020",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.findings-emnlp.234",
doi = "10.18653/v1/2020.findings-emnlp.234",
pages = "2576--2585",
}
@inproceedings{fan-etal-2019-target,
title = "Target-oriented Opinion Words Extraction with Target-fused Neural Sequence Labeling",
author = "Fan, Zhifang and
Wu, Zhen and
Dai, Xin-Yu and
Huang, Shujian and
Chen, Jiajun",
booktitle = "Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)",
month = jun,
year = "2019",
address = "Minneapolis, Minnesota",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/N19-1259",
doi = "10.18653/v1/N19-1259",
pages = "2509--2518",
}
[1]. Zhen Wu, Chengcan Ying, Fei Zhao, Zhifang Fan, Xinyu Dai, Rui Xia. Grid Tagging Scheme for Aspect-oriented Fine-grained Opinion Extraction. In Findings of EMNLP, 2020.
[2]. Zhifang Fan, Zhen Wu, Xin-Yu Dai, Shujian Huang, Jiajun Chen. Target-oriented Opinion Words Extraction with Target-fused Neural Sequence Labeling. In Proceedings of NAACL, 2019.