- Code for AAAI 2023 accepted paper titled "Knowledge-Bridged Causal Interaction Network for Causal Emotion Entailment"
- Weixiang Zhao, Yanyan Zhao, Zhuojun Li, Bing Qin.
- Python 3.7
- PyTorch 1.8.2
- Transformers 4.12.3
- CUDA 11.1
To obtain dataset features:
python get_data.py
To obtain commonsense features:
cd comet-atomic-2020/models/comet_atomic2020_bart
Download the pretrained model in download_model.sh
Then run ./generate_knowledge.py to get csk features
You can download the extracted utterance features and commonsense knowledge we used from: https://pan.baidu.com/s/1n0RbyztvupFLFWe80vr7kg 提取码:qeqt
and place them into ./data
You can train the models with the following codes:
python train.py --hidden_dim 300 --add_emotion --use_pos --use_emo_csk --use_act_csk --use_event_csk --lr 4e-5