File size: 2,561 Bytes
92593b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d3b7919
 
 
 
 
 
92593b6
 
d3b7919
92593b6
 
 
 
 
 
d3b7919
92593b6
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
language: en
tags:
- distilroberta
- sentiment
- emotion
- twitter
- reddit
widget:
- text: Oh my God, he's lost it. He's totally lost it.
- text: What?
- text: Wow, congratulations! So excited for you!
library_name: transformers.js
---

# Transformers.js conversion of [michellejieli/emotion_text_classifier](https://huggingface.co/michellejieli/emotion_text_classifier)

# Fine-tuned DistilRoBERTa-base for Emotion Classification πŸ€¬πŸ€’πŸ˜€πŸ˜πŸ˜­πŸ˜²

# Model Description 

DistilRoBERTa-base is a transformer model that performs sentiment analysis. I fine-tuned the model on transcripts from the Friends show with the goal of classifying emotions from text data, specifically dialogue from Netflix shows or movies. The model predicts 6 Ekman emotions and a neutral class. These emotions include anger, disgust, fear, joy, neutrality, sadness, and surprise.

The model is a fine-tuned version of [Emotion English DistilRoBERTa-base](https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/) and [DistilRoBERTa-base](https://huggingface.co/j-hartmann/emotion-english-distilroberta-base). This model was initially trained on the following table from [Emotion English DistilRoBERTa-base](https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/):

|Name|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|-|

It was fine-tuned on:
|Name|anger|disgust|fear|joy|neutral|sadness|surprise|
|---|---|---|---|---|---|---|---|
|Emotion Lines (Friends)|Yes|Yes|Yes|Yes|Yes|Yes|Yes|

# How to Use 

```js
const { pipeline } = await import('@xenova/transformers');

// Allocate pipeline
const pipe = await pipeline('text-classification', 'MicahB/emotion_text_classifier');
console.log(await pipe("womp womp"));
```

```js
Output:
[{'label': 'joy', 'score': 0.9887555241584778}]
```

# Contact

Please reach out to [[email protected]](mailto:[email protected]) if you have any questions or feedback.


# Reference

```
Jochen Hartmann, "Emotion English DistilRoBERTa-base". https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/, 2022.
Ashritha R Murthy and K M Anil Kumar 2021 IOP Conf. Ser.: Mater. Sci. Eng. 1110 012009
```