Skip to content

Implementation of 'Teaching Machines to Read and Comprehend' by Google DeepMind

License

Notifications You must be signed in to change notification settings

BinbinBian/Teaching-Machines-To-Read-And-Comprehend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 https://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.

About

Implementation of 'Teaching Machines to Read and Comprehend' by Google DeepMind

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages