Theano implementation of the paper A Neural Conversational Model by Oriol Vinyals and Quoc V. Le, which is based on Sequence to Sequence Learning with Neural Networks by Sutskever et al. (2014). Encoder can be RNN, GRU, LSTM, BiRNN, BiGRU and BiLSTM. Decoder can be RNN, GRU and LSTM.
Source: http://googleresearch.blogspot.ca/2015/11/computer-respond-to-this-email.htm
Download word2vec word embeddings from here and copy the file GoogleNews-vectors-negative300.bin.gz
in data
directory i.e neural-converse/data/GoogleNews-vectors-negative300.bin.gz
.
python data.py
Note that python data.py
will randomly sample fixed number of conversations (specified by dataset_size
parameter of pickle_cornell(..)
in utilities/cornell_move_dialogs.py
), therefore, each run might change vocabulary size, and your old trained model might not work. So along with trained model data/cornell movie-dialogs_corpus/models/*-best_model.pkl
, also do take back-up of data/cornell movie-dialogs_corpus/dataset.pkl
and data/cornell movie-dialogs_corpus/w2vec.pkl
.
python seq2seq.py
How appropriate are responses on the test data ?
python eval.py
python chat.py
If you are interested in minimal code, then browse to an older version of this repository.