ONNX Model Zoo

Ndi2020/j-hartmannemotion-english-distilroberta-base

By Ndi2020 · ↓ 0 · ♥ 0 · Updated 2025-07-27

What's in this repo

This page lists the files in Ndi2020/j-hartmannemotion-english-distilroberta-base, including model-quant.onnx.

  • 1 ONNX models (.onnx files)
  • 3 files, including 1 .md, 1 .onnx
  • Last updated 2025-07-27

ONNX files

File Size Download
model-quant.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README


license: apache-2.0


license: apache-2.0

Emotion English DistilRoBERTa-base

简介 ℹ

使用此模型,您可以对英文文本数据进行情感分类。该模型在6个不同的数据集上进行了训练(参见下文附录),并预测Ekman的6种基本情感,加上一个中性类别:

  1. anger(愤怒)🤬
  2. disgust(厌恶)🤢
  3. fear(恐惧)😨
  4. joy(喜悦)😀
  5. neutral(中性)😐
  6. sadness(悲伤)😭
  7. surprise(惊讶)😲

该模型是 DistilRoBERTa-base 的微调版本。如需"非蒸馏"的情感模型,请参考 RoBERTa-large 版本的模型卡片。

应用 🚀

a) 在 Google Colab 上使用 Hugging Face 的 pipeline 命令,用3行代码对单个文本示例运行情感模型:

Open In Colab

from transformers import pipeline
classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", return_all_scores=True)
classifier("I love this!")
输出:
[[{'label': 'anger', 'score': 0.004419783595949411},
  {'label': 'disgust', 'score': 0.0016119900392368436},
  {'label': 'fear', 'score': 0.0004138521908316761},
  {'label': 'joy', 'score': 0.9771687984466553},
  {'label': 'neutral', 'score': 0.005764586851000786},
  {'label': 'sadness', 'score': 0.002092392183840275},
  {'label': 'surprise', 'score': 0.008528684265911579}]]

b) 在 Google Colab 上对多个示例和完整数据集(如 .csv 文件)运行情感模型:

Open In Colab

联系方式 💻

如果您有任何问题或反馈,请联系 jochen.hartmann@tum.de。

感谢 Samuel Domdey 和 chrsiebert 的支持,使该模型得以发布。

参考文献 ✅

如果您使用此模型,请引用以下参考文献进行署名。工作论文即将发布。

Jochen Hartmann, "Emotion English DistilRoBERTa-base". https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/, 2022.

BibTex 引用:

@misc{hartmann2022emotionenglish,
  author={Hartmann, Jochen},
  title={Emotion English DistilRoBERTa-base},
  year={2022},
  howpublished = {\url{https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/}},
}

附录 📚

以下是用于训练的数据集概述。所有数据集均包含英文文本。该表总结了每个数据集中可用的情感类型。这些数据集代表了多样化的文本类型集合,具体包括来自 Twitter、Reddit、学生自我报告和电视剧对话的情感标签文本。由于 MELD(Multimodal EmotionLines Dataset)扩展了流行的 EmotionLines 数据集,因此此处不包含 EmotionLines 本身。

名称 anger(愤怒) disgust(厌恶) fear(恐惧) joy(喜悦) neutral(中性) sadness(悲伤) surprise(惊讶)
Crowdflower (2016) Yes - - Yes Yes Yes Yes
Emotion Dataset, Elvis et al. (2018) Yes - Yes Yes - Yes Yes
GoEmotions, Demszky et al. (2020) Yes Yes Yes Yes Yes Yes Yes
ISEAR, Vikash (2018) Yes Yes Yes Yes - Yes -
MELD, Poria et al. (2019) Yes Yes Yes Yes Yes Yes Yes
SemEval-2018, EI-reg, Mohammad et al. (2018) Yes - Yes Yes - Yes -

该模型在上述数据集的平衡子集上进行训练(每种情感2,811个观测值,即总共近20,000个观测值)。该平衡子集的80%用于训练,20%用于评估。评估准确率为66%(相比之下,随机基线为1/7 = 14%)。

学术应用 📖

以下是使用"Emotion English DistilRoBERTa-base"的论文列表。如果您希望将您的论文添加到列表中,请给我发送电子邮件。

  • Butt, S., Sharma, S., Sharma, R., Sidorov, G., & Gelbukh, A. (2022). What goes on inside rumour and non-rumour tweets and their reactions: A Psycholinguistic Analyses. Computers in Human Behavior, 107345.
  • Kuang, Z., Zong, S., Zhang, J., Chen, J., & Liu, H. (2022). Music-to-Text Synaesthesia: Generating Descriptive Text from Music Recordings. arXiv preprint arXiv:2210.00434.
  • Rozado, D., Hughes, R., & Halberstadt, J. (2022). Longitudinal analysis of sentiment and emotion in news media headlines using automated labelling with Transformer language models. Plos one, 17(10), e0276367.

Model info

onnx license:apache-2.0 region:us
↓ 0 ♥ 0

Created: 2025-07-27

Updated: 2025-07-27

View on Hugging Face

Files (3)

.gitattributes
README.md
model-quant.onnx ONNX

Related models