Datasets:
File size: 4,424 Bytes
8df7dbe 295c797 8df7dbe 295c797 8df7dbe 515acc6 8df7dbe 515acc6 | 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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | ---
license: mit
dataset_info:
config_name: google_translator
features:
- name: lt_text
dtype: string
- name: text
dtype: string
- name: labels
sequence:
class_label:
names:
'0': admiration
'1': amusement
'2': anger
'3': annoyance
'4': approval
'5': caring
'6': confusion
'7': curiosity
'8': desire
'9': disappointment
'10': disapproval
'11': disgust
'12': embarrassment
'13': excitement
'14': fear
'15': gratitude
'16': grief
'17': joy
'18': love
'19': nervousness
'20': optimism
'21': pride
'22': realization
'23': relief
'24': remorse
'25': sadness
'26': surprise
'27': neutral
- name: labels_ekman
sequence:
class_label:
names:
'0': anger
'1': disgust
'2': fear
'3': joy
'4': sadness
'5': surprise
'6': neutral
- name: id
dtype: string
splits:
- name: train
num_bytes: 7095238
num_examples: 43410
- name: validation
num_bytes: 885284
num_examples: 5426
- name: test
num_bytes: 882333
num_examples: 5427
download_size: 6057071
dataset_size: 8862855
configs:
- config_name: google_translator
data_files:
- split: train
path: google_translator/train-*
- split: validation
path: google_translator/validation-*
- split: test
path: google_translator/test-*
task_categories:
- text-classification
language:
- en
- lt
---
Original dataset: [GoEmotions dataset](https://huggingface.co/datasets/google-research-datasets/go_emotions)
The dataset was machine translated to Lithuanian using free Google Translate API.
Tool used for translation: [deep-translator](https://pypi.org/project/deep-translator/)
Translation script:
```python
from datasets import load_dataset
from deep_translator import GoogleTranslator
from deep_translator.exceptions import TranslationNotFound
original_dataset = load_dataset("go_emotions", name="simplified")
translator = GoogleTranslator(source="en", target="lt")
def translate_batch(batch):
original_text = batch["text"]
while True:
try:
translated_batch = translator.translate_batch(original_text)
break
except TranslationNotFound:
# Translation can fail due to API limits, so we retry until it works
print(f"Translation failed. Retrying...")
# We fix untranslated entries (None values) by replacing them with the original text
for i in range(len(translated_batch)):
if not translated_batch[i]:
translated_batch[i] = original_text[i]
print(f"Replaced {original_text[i]} vs {translated_batch[i]}")
batch["lt_text"] = translated_batch
return batch
translated_dataset = original_dataset.map(
translate_batch, batched=True, batch_size=500
)
```
Column `labels` contains multi-label emotion annotations with 28 emotion labels as per GoEmotion dataset:
```yaml
0: admiration
1: amusement
2: anger
3: annoyance
4: approval
5: caring
6: confusion
7: curiosity
8: desire
9: disappointment
10: disapproval
11: disgust
12: embarrassment
13: excitement
14: fear
15: gratitude
16: grief
17: joy
18: love
19: nervousness
20: optimism
21: pride
22: realization
23: relief
24: remorse
25: sadness
26: surprise
27: neutral
```
Column `labels_ekman` contains multi-label emotion annotations with 7 base emotions as per Dr. Ekman theory:
```yaml
0: anger
1: disgust
2: fear
3: joy
4: sadness
5: surprise
6: neutral
```
Label mapping from 28 emotions from GoEmotion to 7 base emotions as per Dr. Ekman theory:
|GoEmotion|Ekman|
|---|---|
| admiration | joy|
| amusement | joy|
| anger | anger|
| annoyance | anger|
| approval | joy|
| caring | joy|
| confusion | surprise|
| curiosity | surprise|
| desire | joy|
| disappointment | sadness|
| disapproval | anger|
| disgust | disgust|
| embarrassment | sadness|
| excitement | joy|
| fear | fear|
| gratitude | joy|
| grief | sadness|
| joy | joy|
| love | joy|
| nervousness | fear|
| optimism | joy|
| pride | joy|
| realization | surprise|
| relief | joy|
| remorse | sadness|
| sadness | sadness|
| surprise | surprise|
| neutral | neutral| |