The official implementation for the paper Improving Empathetic Dialogue Generation by Dynamically Infusing Commonsense Knowledge.
Install the required libraries (Python 3.8.5 | CUDA 10.2)
pip install -r requirements.txt
The preprocessed dataset is already provided, you can download the data from Baidu Netdisk (passcode: 4b8l) , and then put it in the folder /data/ED/dataset
.
If you want to create the dataset yourself, delete this file, download the COMET checkpoint and place it in /data
. The preprocessed dataset would be generated after the training script.
bash run_train.sh
where data_ratio can be used for low resource ablation studies.
bash run_evaluate.sh
If you find our work useful for your research, please kindly cite our paper as follows:
@article{DCKS2023,
title={Improving Empathetic Dialogue Generation by Dynamically Infusing Commonsense Knowledge},
author={Hua Cai, Xuli Shen, Qing Xu, Weilin Shen, Xiaomei Wang, Weifeng Ge, Xiaoqing Zheng, Xiangyang Xue},
year={2023},
}