Skip to content

The PyTorch code for paper "Knowledge-Enriched Transformer for Emotion Detection in Textual Conversations"

License

Notifications You must be signed in to change notification settings

zhongpeixiang/KET

Repository files navigation

The PyTorch code for paper: Knowledge-Enriched Transformer for Emotion Detection in Textual Conversations (PDF)

The model is largely based on The Annotated Transformer

Steps

  • Download data: download data to respective foler in ./data/: EC, DD, MELD, EmoryNLP, and IEMOCAP.
  • Install Magnitude Medium GloVe for pretrained word embedding.
  • Preprocess data: run preprocess.py to process csv or pkl (IEMOCAP) files into pkl data.
  • Download ConceptNet and NRC_VAD.
  • Preprocess ConceptNet and NRC_VAD: run preprocess_conceptnet.py and preprocess_NRC_VAD.py.
  • Model training: run train.py.
  • Model evaluation: run train.py with test_mode set.

Citing

If you find this repo or paper useful, please cite

@inproceedings{zhong2019knowledge,
    title = "Knowledge-Enriched Transformer for Emotion Detection in Textual Conversations",
    author = "Zhong, Peixiang and Wang, Di and Miao, Chunyan",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    pages = "165--176"
}

About

The PyTorch code for paper "Knowledge-Enriched Transformer for Emotion Detection in Textual Conversations"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages