Skip to content
/ KBRD Public
forked from THUDM/KBRD

Source code and dataset for EMNLP 2019 paper "Towards Knowledge-Based Recommender Dialog System"

License

Notifications You must be signed in to change notification settings

NLP-hua/KBRD

 
 

Repository files navigation

KBRD

Towards Knowledge-Based Recommender Dialog System.
Qibin Chen, Junyang Lin, Yichang Zhang, Ming Ding, Yukuo Cen, Hongxia Yang, Jie Tang.
In EMNLP-IJCNLP 2019

Prerequisites

  • Linux
  • Python 3.6
  • PyTorch 1.2.0

Getting Started

Installation

Clone this repo.

git clone https://github.com/THUDM/KBRD
cd KBRD

Please install dependencies by

pip install -r requirements.txt

Dataset

  • We use the ReDial dataset, which will be automatically downloaded by the script.
  • Download the refined knowledge base (dbpedia) used in this paper [Google Drive] [Tsinghua Cloud]. Decompress it and get the dbpedia/ folder, which should contain two files mappingbased_objects_en.ttl and short_abstracts_en.ttl.
  • Download the proprocessed extracted entities set [Google Drive] [Tsinghua Cloud] and put it under <path/to/KBRD/data/redial/.

Training

To train the recommender part, run:

bash scripts/both.sh <num_exps> <gpu_id>
bash scripts/baseline.sh <num_exps> <gpu_id>

To train the dialog part, run:

bash scripts/t2t_rec_rgcn.sh <num_exps> <gpu_id>

Logging

TensorBoard logs and models will be saved in saved/ folder.

Evaluation

  • show_bias.py is used to show the vocabulary bias of a specific movie (like in Table 4)

TODO

If you have difficulties to get things working in the above steps, please let us know.

Cite

Please cite our paper if you use this code in your own work:

@article{chen2019towards,
  title={Towards Knowledge-Based Recommender Dialog System},
  author={Chen, Qibin and Lin, Junyang and Zhang, Yichang and Ding, Ming and Cen, Yukuo and Yang, Hongxia and Tang, Jie},
  journal={arXiv preprint arXiv:1908.05391},
  year={2019}
}

About

Source code and dataset for EMNLP 2019 paper "Towards Knowledge-Based Recommender Dialog System"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%