Skip to content

circle-hit/KBCIN

Repository files navigation

KBCIN

  • Code for AAAI 2023 accepted paper titled "Knowledge-Bridged Causal Interaction Network for Causal Emotion Entailment"
  • Weixiang Zhao, Yanyan Zhao, Zhuojun Li, Bing Qin.

Requirements

  • Python 3.7
  • PyTorch 1.8.2
  • Transformers 4.12.3
  • CUDA 11.1

Preparation

Processing Features

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

Preprocessed 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

Training

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

About

Code for AAAI 2023 accepted paper titled "Knowledge-Bridged Causal Interaction Network for Causal Emotion Entailment"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages