KET
The PyTorch code for paper "Knowledge-Enriched Transformer for Emotion Detection in Textual Conversations"
Install / Use
/learn @zhongpeixiang/KETREADME
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, andIEMOCAP. - Install Magnitude Medium GloVe for pretrained word embedding.
- Preprocess data: run
preprocess.pyto processcsvorpkl(IEMOCAP) files intopkldata. - Download ConceptNet and NRC_VAD.
- Preprocess ConceptNet and NRC_VAD: run
preprocess_conceptnet.pyandpreprocess_NRC_VAD.py. - Model training: run
train.py. - Model evaluation: run
train.pywithtest_modeset.
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"
}
