Author implementation of "Learning Recurrent Span Representations for Extractive Question Answering" (Lee et al. 2016)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
base
data
tokenizer
.gitignore
README.md
evaluate11.py
model.py
rasor.py
reader.py
setup.py
utils.py

README.md

Learning Recurrent Span Representations for Extractive Question Answering

https://arxiv.org/abs/1611.01436

Requirements

Theano, Matplotlib, Java

Initial setup

$ python setup.py

This will download GloVe word embeddings and tokenize raw training / development data.
(download will be skipped if zipped GloVe file is manually placed in data directory).

Training

$ python rasor.py --device DEVICE --train

where DEVICE is cpu, or an indexed GPU specification e.g. gpu0.
When specifying a certain GPU, the theano device flag must be set to cpu, i.e. set device=cpu in your .theanorc file.

Making predictions

$ python rasor.py --device DEVICE test_json_path pred_json_path

where test_json_path is the path of a JSON file containing articles, paragraphs and questions (see SQuAD website for specification of JSON structure), and pred_json_path is the path to write predictions to.


Tested in the following environment:

  • Ubuntu 14.04
  • Python 2.7.6
  • NVIDIA CUDA 8.0.44 and cuDNN 5.1.5
  • Theano 0.8.2
  • Matplotlib 1.3.1
  • Oracle JDK 8