Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

SVRNN-Dialogues

This repo contains code for our paper Structured Attention for Unsupervised Dialogue Structure Induction, accepted as a long paper in EMNLP 2020. The codebase is developed on Unsupervised-Structure-Learning and re-written with PyTorch.

Dependencies

Dependencies are listed in requirement.txt. Install them by running

make install

Dataset

SimDial

Simulated dialogs in JSON are generated with SimDial. Generate samples and interpretion by running

make simdial

Ubuntu Chat Corpus

First download the Ubuntu Chat Corpus from here. Then generate samples from the corpus by running

make dataset data_path=path/to/your/ubuntu/corpus

If you want to use GloVe in your experiment, download it here.

Train

All configuration is in params.py. You should change use_cuda=True if you want to use GPU. Try VRNN with Linear CRF Attention on SimDial by running

python train_linear_vrnn.py

or VRNN with Non-projective Dependency Tree Attention on Ubuntu Chat Corpus

python train_tree_vrnn.py

Decode

After training, there will be a ckpt_dir under log/linear_vrnn or log/tree_vrnn, e.g., run1532935232. In the ckpt_dir, there will be saved checkpints in format *.pt.

python train_linear_vrnn.py --decode --ckpt_dir run1532935232 --ckpt_name vrnn_60.pt

or

python train_tree_vrnn.py --decode --ckpt_dir run1532935232 --ckpt_name vrnn_60.pt

Citation

If you find the paper and/or the code helpful, please cite

@article{qiu2020structured,
  title={Structured Attention for Unsupervised Dialogue Structure Induction},
  author={Qiu, Liang and Zhao, Yizhou and Shi, Weiyan and Liang, Yuan and Shi, Feng and Yuan, Tao and Yu, Zhou and Zhu, Song-Chun},
  journal={arXiv preprint arXiv:2009.08552},
  year={2020}
}

About

Code for Structured Attention for Unsupervised Dialogue Structure Induction.

Resources

License

Releases

No releases published

Packages

No packages published

Languages