sunghoon014 / GTS

Code and data for paper "Grid Tagging Scheme for Aspect-oriented Fine-grained Opinion Extraction". Aspect opinion pair datasets and aspect triplet datasets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GTS

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.

Data

[Data] [Pre-trained Model(from huggingface)]. Data format descriptions are here.

❗Note: our opinion triplet datasets are completely from alignments of our previous work TOWE datasets and the original SemEval 2014, 2015, 2016 datasets, which are different from others.

Requirements

See requirement.txt or Pipfile for details

  • pytorch==1.7.1
  • transformers==3.4.0
  • python=3.6

Usage

  • Training

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/".

  • Testing

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.

Citation

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",
}

Reference

[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.

About

Code and data for paper "Grid Tagging Scheme for Aspect-oriented Fine-grained Opinion Extraction". Aspect opinion pair datasets and aspect triplet datasets.

License:Apache License 2.0


Languages

Language:Python 100.0%