Pytorch implementation of Learning to Select Knowledge for Response Generation in Dialog Systems
For decoder, I apply Hierarchical Gated Fusion Unit (HGFU) [Yao et al. 2017] and I only use three number of knowledges for the sake of code simplicity.
sh install.sh
sh download_glove.sh
python train.py --pre_epoch 5 --n_epoch 15 --n_batch 128
python demo.py
# example
Type first Knowledge: i'm very athletic.
Type second Knowledge: i wear contacts.
Type third Knowledge: i have brown hair.
you: hi ! i work as a gourmet cook .
bot(response): i don't like carrots . i throw them away . # reponse can change based on training.
- If you type "change knowledge" at (you), you can retype three knowledges.
- If you type "exit" at (you), you can terminate demo.
- I only use "self_original_no_cands" in Persona-chat released by ParlAI