Skip to content

The official implementation of "A Simple and Effective Model for Answering Multi-span Questions".

Notifications You must be signed in to change notification settings

WSTC2007/tag-based-multi-span-extraction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Simple and Effective Model for Answering Multi-span Questions

This repository contains the official implementation of the following paper:
Elad Segal*, Avia Efrat*, Mor Shoham*, Amir Globerson, Jonathan Berant. "A Simple and Effective Model for Answering Multi-span Questions".

*Equal Contribution

Use DROP Explorer to better understand DROP, Quoref and the models' predictions.

Usage

The commands listed in this section need to be run from the root directory of the repository.

First, install prerequisites with
pip install -r requirements.txt

Commands

  • Train a model:
    allennlp train configs/[config file] -s [training_directory] --include-package src

  • Output predictions by a model:
    allennlp predict model.tar.gz drop_data/drop_dataset_dev.json --predictor machine-comprehension --cuda-device 0 --output-file predictions.jsonl --use-dataset-reader --include-package src

  • Evaluate a model (unofficial evaluation code, fast):
    allennlp evaluate model.tar.gz drop_data/drop_dataset_dev.json --cuda-device 0 --output-file eval.json --include-package src

  • Evaluate a model (official evaluation code, slow):

    1. python tools/generate_submission_predictions.py --archive_file model.tar.gz --input_file drop_data/drop_dataset_dev.json --cuda-device 0 --output_file predictions.json --include-package src
    2. python -m allennlp.tools.drop_eval --gold_path drop_data/drop_dataset_dev.json --prediction_path predictions.json --output_path metrics.json

About

The official implementation of "A Simple and Effective Model for Answering Multi-span Questions".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 56.0%
  • Jupyter Notebook 38.0%
  • Jsonnet 6.0%