Towards Knowledge-Based Recommender Dialog System.
Qibin Chen, Junyang Lin, Yichang Zhang, Ming Ding, Yukuo Cen, Hongxia Yang, Jie Tang.
In EMNLP-IJCNLP 2019
- Linux
- Python 3.6
- PyTorch 1.2.0
Clone this repo.
git clone https://github.com/THUDM/KBRD
cd KBRD
Please install dependencies by
pip install -r requirements.txt
- 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 filesmappingbased_objects_en.ttl
andshort_abstracts_en.ttl
. - Download the proprocessed extracted entities set [Google Drive] [Tsinghua Cloud] and put it under
<path/to/KBRD/data/redial/
.
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>
TensorBoard logs and models will be saved in saved/
folder.
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.
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}
}