CARE: Commonsense-Aware Emotional Response Generation with Latent Concepts
The paper is available here
- ./emotion_classifier: our deepmoji classifier (https://github.com/huggingface/torchMoji).
- ./process_data: scripts to process data, extract emotional triplets, and construct latent concepts
- ./tools: scripts to expand VAD lexicon, process data, evaluate responses, and do helper tasks
- ./OpenKE: scripts to train TransE on ConceptNet, based on (https://github.com/thunlp/OpenKE)
- ./onmt: the main package for our model, based on (https://github.com/OpenNMT/OpenNMT-py)
- Train an emotion classifier on emotional tweets
- Download and preprocess dataset
- Use the trained emotion classifer to classify the emotions of responses
- Extract emotional triplets using scripts in ./process_data using PMI
- Extend ConceptNet with extracted emotional triplets
- Train a TransE model on the extended ConceptNet using ./OpenKE
- Extract concepts in messages
- Generate relational and emotional latent concepts for the responses
- run run_reddit.sh/run_twitter.sh to train and evaluate the model
- Reddit: https://www.dropbox.com/s/p429s2yhzkti6ra/reddit.zip?dl=0
- Twitter: https://www.dropbox.com/s/u6grauxtv8xptqw/twitter.zip?dl=0
The transformer is based on the OpenNMT-py package (v1.0.0). Follow their doc for the preprocessing and vocabulary construction of the conversation datasets. The training, generation, and evaluation follow the shell scripts.