Apache License 2.0

项目介绍

snakeztc/NeuralDialog-ZSDG 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Apache License 2.0 许可证,目前获得 132 个 Star、26 次 Fork。

仓库全名
snakeztc/NeuralDialog-ZSDG
开源许可证
Apache License 2.0
Star 数
132
Fork 数
26
未关闭 Issue
1

README 摘要

Zero-shot Dialog Generation (ZSDG) for End-to-end Neural Dialog Models Codebase for Zero-Shot Dialog Generation with Cross-Domain Latent Actions, published as a long paper in SIGDIAL 2018. Reference information is in the end of this page. Presentation slides can be found here. This work won the best paper award at SIGDIAL 2018. If you use any source codes or datasets included in this toolkit in your work, please…

完整内容见 GitHub 原始 README 或本页 。

常见问题

NeuralDialog-ZSDG 用什么语言开发?

主要使用 Python 编写,采用 Apache License 2.0 许可证,目前有 132 个 Star。

NeuralDialog-ZSDG 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 NeuralDialog-ZSDG 的源码?

可以直接克隆仓库:git clone https://github.com/snakeztc/NeuralDialog-ZSDG.git,默认分支为 master;安装与运行步骤见仓库 README。

NeuralDialog-ZSDG 最近还在维护吗?

仓库最近一次更新为 2019年1月9日,当前有 1 个未关闭 Issue;Star 数为 132,可作为社区活跃度的参考。

关于

PyTorch codebase for zero-shot dialog generation SIGDIAL 2018, It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
191
价值分
87
活跃状态
活跃

README

Zero-shot Dialog Generation (ZSDG) for End-to-end Neural Dialog Models

Codebase for Zero-Shot Dialog Generation with Cross-Domain Latent Actions, published as a long paper in SIGDIAL 2018. Reference information is in the end of this page. Presentation slides can be found here.

This work won the best paper award at SIGDIAL 2018.

If you use any source codes or datasets included in this toolkit in your work, please cite the following paper. The bibtex are listed below:

@article{zhao2018zero,
  title={Zero-Shot Dialog Generation with Cross-Domain Latent Actions},
  author={Zhao, Tiancheng and Eskenazi, Maxine},
  journal={arXiv preprint arXiv:1805.04803},
  year={2018}
}

Requirements

python 2.7
pytorch >= 0.3.0.post4
numpy
nltk

Datasets

The data folder contains three datasets:

Getting Started

The following scripts implement 4 different models, including:

  • Baseline: standard attentional encoder-decoder and encoder with pointer-sentinel-mixture decoder (see the paper for details).
  • Out Models: cross-domain Action Matching training for the above two baseline systems.

Training

Run the following to experiment on the SimDial dataset

python simdial-zsdg.py

Run the following to experiment on the Stanford Multi-Domain Dataset

python stanford-zsdg.py

Switching Model

The hyperparameters are exactly the same for the above two scripts. To train different models, use the following configurations. The following examples are for simdial-zsdg.py, which also apply to stanford-zsdg.py.

For baseline model with attetnion decoder:

python simdial-zsdg.py --action_match False --use_ptr False

For baseline model with pointer-sentinel mixture decoder:

python simdial-zsdg.py --action_match False --use_ptr True    

For action matching model with attetnion decoder:

python simdial-zsdg.py --action_match True --use_ptr False

For action matching model with attetnion decoder:

python simdial-zsdg.py --action_match True --use_ptr True    

Hyperparameters

The following are some of key hyperparameters:

  • action_match: if or not using the proposed AM algorithm for training
  • target_example_cnt: the number of seed response from each domain used for training.
  • use_ptr: if or not using pointer-sentinel-mixture decoder
  • black_domains: define which domains are excluded from training
  • black_ratio: the percentage of training data from black_domains are excluded. Range=[0,1], where 1 means removed 100% of the training data.
  • forward_only: use existing model or train a new one
  • load_sess: the path to the existing model
  • rnn_cell: the type of RNN cell, supporting LSTM or GRU
  • dropout: the chance for dropout.

Test a existing model

All trained models and log files are saved to the log folder. To run a existing model, you can:

  • Set the forward_only argument to be True
  • Set the load_sess argument to te the path to the model folder in log
  • Run the script

评论

暂无评论