Implementation of 'Teaching Machines to Read and Comprehend' by Google DeepMind
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
model
utilities
LICENSE
README.md
ask.py
data.py
eval.py
train.py

README.md

Teaching-Machines-to-Read-and-Comprehend

Theano implementation of Deep LSTM Reader & Attentive Reader from Google DeepMind's paper Teaching Machines to Read and Comprehend - Hermann et al. (2015). Models

Dependencies

Datasets

I am using processed RC datasets from this repository. The original datasets can be downloaded from https://github.com/deepmind/rc-data or http://cs.nyu.edu/~kcho/DMQA/. Processed ones are just simply concatenation of all data instances and keeping document, question and answer only.

Usage

Note: story & question are alias for document & query respectively.

Generating Data

python data.py

Training

train.py provides an easy interface to train deep/attentive reader, model/*_reader.py contains the actual code for model definition and training. Please note that call to train_*(..) using use_existing_model=True will replace the current existing best model with the new best model, so save your intermediate models accordingly.

Evaluation

eval.py provide interface to compute various performance params (accuracy, f1-score) for trained models.

python eval.py

Use ask.py to let the model infer from your stories and questions.

python ask.py

Acknowledgement

This code uses portion of Data reading interface written by Danqi Chen.