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.
Failed to load latest commit information.

Learning Recurrent Span Representations for Extractive Question Answering


Theano, Matplotlib, Java

Initial setup

$ python

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).


$ python --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 --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