This repository is the implementation of "CEM: Machine-Human Chatting Handoff via Causal-Enhance Module" [paper] on Clothes and Makeup2 datasets. Our paper has been accepted for presentation at EMNLP 2022.
CEM solves the problem of Machine-Human Chatting Handoff, establishing the causal graph of MHCH, which is a simple-yet-effective module and can be easy to plug into the existing MHCH methods.
Activate an enviroment of Python 3.7, then sh env.sh
.
Our experiments are conducted based on two publicly available Chinese customer service dialogue datasets, namely Clothes and Makeup2, collected by Song et al. (2019) from Taobao.
-
Each pkl file is a data list that includes dialogue samples. The content lists of the dataset can be seen in
data_loader.py
. -
The vocab.pkl contains a vocabulary class which contains the pre-trained glove word embeddings of token ids.
- Train the model (including training, validation, and testing)
python -u -W ignore main.py --task train --model cem --data makeup2
- Test the model
python -u -W ignore main.py --task test --model cem --data makeup2 --model_path pretrained_model_dir
Many thanks to LauJames for his Tensorflow framework for MHCH task.