This repository contains the code for our ACL 2023 paper Event Extraction as Question Generation and Answering .
We adapted the preprocessing scripts from
the Dygiepp repo. The main difference is
that we retrieve the character offsets of the annotations as well as sentences.
Please refer to ./data_process/README.md
for details.
The code is based on Python 3.8+, and the scores reported are based on experiments on a single AWS p3.2xlarge instance.
To install the required dependencies:
pip install -r requirements.txt
bash ./train_event_trigger_model.sh
The trained model will be saved in ./model_checkpoint/trigger_model
by
default.
bash ./train_qg_bart.sh
for the BART backbone.
bash ./train_qg_t5.sh
for the T5 backbone.
The trained model will be saved in ./model_checkpoint/qg_model_bart
or ./model_checkpoint/qg_model_t5
for BART and T5 backbone respectively by
default.
bash ./train_argument_extraction_bart.sh
for the BART backbone.
bash ./train_argument_extraction_t5.sh
for the T5 backbone.
The trained model will be saved in ./model_checkpoint/eae_model_bart
or ./model_checkpoint/eae_model_t5
for BART and T5 backbone respectively by
default.
bash evaluate_e2e_predicted_triggers_bart.sh
for the BART backbone.
bash evaluate_e2e_predicted_triggers_t5.sh
for the T5 backbone.
If you find the code in this repo helpful, please cite our paper:
@inproceedings{lu-etal-2023-event,
title = "Event Extraction as Question Generation and Answering",
author = "Lu, Di and
Ran, Shihao and
Tetreault, Joel and
Jaimes, Alejandro",
booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",
month = jul,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.acl-short.143",
}