This repository contains the implementation of Key Value Memory Networks for Directly Reading Documents in Python using Tensorflow. The model is tested on The Children's Book Test and CNN QA.
git clone https://github.com/canguezelhan/key-value-memory-network.git
mkdir ./key-value-memory-network/key_value_memory/logs
mkdir ./key-value-memory-network/key_value_memory/data/
cd ./key-value-memory-network/key_value_memory/data
wget http://www.thespermwhale.com/jaseweston/babi/CBTest.tgz
tar xzvf ./CBTest.tgz
wget https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTTljRDVZMFJnVWM
tar xzvf ./cnn.tgz
cd ../
python model.py
The script, when executed, creates several files as output. These files can be found in the directory key_value_memory/results/
There are serval flags within model.py. Check all available flags with the following command.
python model.py -h
- tensorflow
- scikit-learn
- six
- nltk