Skip to content

A collection of Tensorflow implementation for several milestone neural dialogue models.

Notifications You must be signed in to change notification settings

zheng-yanan/collection-of-neural-dialog-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collections of Neural Dialogue Models

[to be continued]

A collection of Tensorflow implementation for several milestone neural dialogue generation works. It includes:

Usage:

First download GoogleNews word2vec embeddings from https://code.google.com/archive/p/word2vec/downloads and put it in the root directoy. The default setting use 300 dimension.

To train a model:

python run_models.py --model <model_name> -- dataset <dataset_name>

where <model_name> can be seq2seq, hred, vhred or kgcvae, and <dataset_name> can be dailydialog or switchboard. It will save models to ./save/model_dir.

To test an existing model:

python run_models.py --model <model_name> -- dataset <dataset_name> --forward True --test_path <model_dir>

where <model_dir> is in the format of "run_<model_name>_<dataset_name>_others". A file containing predicted responses will be generated in <model_dir>/test.txt at the same time.

To evaluate an existing model using automatic metrics:

python eval_utils.py --input_file <model_dir>/test.txt

It provides commonly used evaluation tools for dialog generation, including the per-word perplexity, distinct-1, distinct-2, bleu-N, embedding-based metrics (average & greedy & extrema).

Datasets

Two datasets are provided, respectively dailydialog and SwitchBoard. Both datasets contains dialogue instances, along with rich meta information. Please refer to daily_readme.txt and swda_readme.txt for details.

Prerequisites

  • TensorFlow 1.4.0
  • Python 2.7

Acknowledgements

Several code snippets are reused from NeuralDialog-CVAE. I appreciate all the authors who made their code public, which greatly facilitates this project. This repository would be continuously updated.

About

A collection of Tensorflow implementation for several milestone neural dialogue models.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published