This is the repo for our work "Towards Persona-Based Empathetic Conversational Models" (EMNLP 2020). The code depends on PyTorch (>=v1.0) and transformers (>=v2.3).
The PEC dataset is available here.
The persona dataset with 100 persona sentences each is available here
You can refer to the sample files here to preprocess the datasets: valid_cleaned_bert.pkl and persona_20.pkl
Our dataset is available on Huggingface Datasets for ease of use.
This repo includes our implementation of CoBERT.
python CoBERT.py --config CoBERT_config.json
Set test_mode=1 and load_model_path to a saved model in CoBERT_config.json, and then run
python CoBERT.py --config CoBERT_config.json