The code for the paper "Neutral Utterances are Also Causes: Enhancing Conversational Causal Emotion Entailment with Social Commonsense Knowledge".
The appendix mentioned in the paper is present in here.
Some code is based on DAG-ERC, RECCON, and COMET-ATOMIC-2020.
- Pytorch==1.8.1
- Transformers==4.3.3
- numpy=1.19.2
- nltk
Edge attributes of skaig: skaig_data
bash run_single.sh
-
generate_knowledge.py
is used to generate social commonsense knowledge for our method. Put it incomet-atomic-2020/models/comet_atomic2020_bart/
of COMET-ATOMIC-2020. P.S. the paths of loaded and dumped files should be modified to your own data paths. We have uploaded all the generated knowledge data indd_data
. -
knowledge_select.py
is used to select sentimental related pieces of knowledge for a pair of utterances. We have uploaded all the processed data indd_data
. -
entail_construct.py
is used to form the data into the entailment style with or without emotion words. The generatad files is used to train and evaluate the baseline of RECCON-DD. Furthermore, replace thetrain_classification.py
,eval_classification.py
in RECCON withRECCON_baseline/train_classification.py
andRECCON_baseline/eval_classification.py
in this repository. We have uploaded the entailment style data in here. Download the data and put them indata/subtask2/fold1/
in RECCON.