Skip to content

xinyadu/RGQA

Repository files navigation

R-GQA

Code for ``Retrieval-Augmented Generative Question Answering for Event Argument Extraction'' [link]

If you use our code, please cite:

@inproceedings{R-GQA,
    title = {Retrieval-Augmented Generative Question Answering for Event Argument Extraction},
    author={Du, Xinya and Ji, Heng},
    booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
    year = "2022",
    publisher = "Association for Computational Linguistics",
}

Dependencies

  • sentence_transformers=2.1.0
  • pytorch=1.6
  • transformers=3.1.0
  • pytorch-lightning=1.0.6
  • spacy=3.0 # conflicts with transformers
  • pytorch-struct=0.4

Datasets

  • ACE05 (Access from LDC and preprocessing following OneIE. In this repo, we provide toy example under ./data_toy.
  • WikiEvents: The original dataset release is here.

Train/Test on the toy dataset

  • Train ./scripts/toy_train_ace_ir_yn.sh

  • Test ./scripts/toy_test_ace_ir_yn.sh

  • Evaluation (on toy test file)

DATA_DIR=data_toy/ace/json
CKPT_NAME=gen_ir_yn

python src/genie/scorer.py --gen-file=checkpoints/${CKPT_NAME}-pred/predictions.jsonl --dataset=ACE \
	--test-file=${DATA_DIR}/toy.test.oneie.json \
	--output-file=${DATA_DIR}/predict.toy.test.oneie.json \

Trigger Extraction

In this repo, we tackle the task where the event trigger is provided. You are welcome to use our prior implementations for EEQA [link] to get trigger extraction results first.

Model Checkpoints

We provide epoch=5.ckpt for directly running inference on the toy data here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published