This repository contains the code for COLING-2022 full paper:TAKE: Topic-shift Aware Knowledge sElection for Dialogue Generation.
Please contact Chenxu Yang ([email protected]) if you have any question.
- transformers==4.15.0
- python 3.9
- pytorch 1.10.1
We use the Wizard of Wikipedia datasets preprocessed by Meng et al. You can download the datasets from here. After downloading, please put the files in the following 3 dirs:
./knowSelect/datasets/wizard_of_wikipedia/
./dialogen/datasets/wizard_of_wikipedia/
./dialogen/datasets/wow_gpt2/
We provide pretrained checkpoints to save your time, and you can acquire them here. You need to download the corresponding checkpoints and put them in the folder ./knowSelect/output/TAKE_WoW/model/ (KS) or the folder ./dialogen/output/TAKE_WoW/model/ (DG) according to their name. After that, you can run the infer_bash.sh in in the root directory to get the evaluation results.
Of course, you can also retrain and evaluate TAKE by running the train_bash.sh in the root directory.
Please cite our paper if you use use source code of TAKE in your work:
Chenxu Yang, Zheng Lin, Jiangnan Li, Fandong Meng, Weiping Wang, Lanrui Wang, and Jie Zhou. 2022. TAKE: Topic-shift Aware Knowledge sElection for Dialogue Generation. In Proceedings of the 29th International Conference on Computational Linguistics, pages 253–265, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
