Giter VIP home page Giter VIP logo

event-extraction-as-question-generation-and-answering's Introduction

Event-Extraction-as-Question-Generation-and-Answering

This repository contains the code for our ACL 2023 paper Event Extraction as Question Generation and Answering .

ACE data preprocessing

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.

Requirement

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

Code

Train and eval models

Train the Trigger Detection Model.

bash ./train_event_trigger_model.sh

The trained model will be saved in ./model_checkpoint/trigger_model by default.

Train the Question Generation Models.

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.

Train Argument Extraction Models and Evaluate with Gold Event Triggers

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.

Evaluate Argument Extraction models with System Predicted Event Triggers

bash evaluate_e2e_predicted_triggers_bart.sh for the BART backbone.

bash evaluate_e2e_predicted_triggers_t5.sh for the T5 backbone.

Citation:

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

event-extraction-as-question-generation-and-answering's People

Contributors

dlu-dataminr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.