Datasets:
Updated repo and README
Browse files
README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
license: mit
|
| 3 |
dataset_info:
|
| 4 |
-
config_name:
|
| 5 |
features:
|
| 6 |
- name: lt_text
|
| 7 |
dtype: string
|
|
@@ -65,27 +64,29 @@ dataset_info:
|
|
| 65 |
download_size: 6057071
|
| 66 |
dataset_size: 8862855
|
| 67 |
configs:
|
| 68 |
-
- config_name:
|
| 69 |
data_files:
|
| 70 |
- split: train
|
| 71 |
-
path:
|
| 72 |
- split: validation
|
| 73 |
-
path:
|
| 74 |
- split: test
|
| 75 |
-
path:
|
|
|
|
| 76 |
task_categories:
|
| 77 |
- text-classification
|
| 78 |
language:
|
| 79 |
-
- en
|
| 80 |
- lt
|
|
|
|
| 81 |
---
|
| 82 |
-
Original dataset: [GoEmotions dataset](https://huggingface.co/datasets/google-research-datasets/go_emotions)
|
| 83 |
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
Tool used for translation: [deep-translator](https://pypi.org/project/deep-translator/)
|
| 87 |
|
| 88 |
-
Translation script:
|
| 89 |
```python
|
| 90 |
from datasets import load_dataset
|
| 91 |
from deep_translator import GoogleTranslator
|
|
@@ -102,17 +103,16 @@ def translate_batch(batch):
|
|
| 102 |
translated_batch = translator.translate_batch(original_text)
|
| 103 |
break
|
| 104 |
except TranslationNotFound:
|
| 105 |
-
# Translation can fail due to API limits, so we retry until it works
|
| 106 |
print(f"Translation failed. Retrying...")
|
| 107 |
-
|
| 108 |
# We fix untranslated entries (None values) by replacing them with the original text
|
| 109 |
for i in range(len(translated_batch)):
|
| 110 |
if not translated_batch[i]:
|
| 111 |
translated_batch[i] = original_text[i]
|
| 112 |
print(f"Replaced {original_text[i]} vs {translated_batch[i]}")
|
| 113 |
-
|
| 114 |
-
batch["
|
| 115 |
-
|
| 116 |
return batch
|
| 117 |
|
| 118 |
translated_dataset = original_dataset.map(
|
|
@@ -120,7 +120,9 @@ translated_dataset = original_dataset.map(
|
|
| 120 |
)
|
| 121 |
```
|
| 122 |
|
| 123 |
-
|
|
|
|
|
|
|
| 124 |
```yaml
|
| 125 |
0: admiration
|
| 126 |
1: amusement
|
|
@@ -152,7 +154,7 @@ Column `labels` contains multi-label emotion annotations with 28 emotion labels
|
|
| 152 |
27: neutral
|
| 153 |
```
|
| 154 |
|
| 155 |
-
|
| 156 |
```yaml
|
| 157 |
0: anger
|
| 158 |
1: disgust
|
|
@@ -163,8 +165,9 @@ Column `labels_ekman` contains multi-label emotion annotations with 7 base emoti
|
|
| 163 |
6: neutral
|
| 164 |
```
|
| 165 |
|
| 166 |
-
|
| 167 |
-
|
|
|
|
| 168 |
|---|---|
|
| 169 |
| admiration | joy|
|
| 170 |
| amusement | joy|
|
|
@@ -193,4 +196,7 @@ Label mapping from 28 emotions from GoEmotion to 7 base emotions as per Dr. Ekma
|
|
| 193 |
| remorse | sadness|
|
| 194 |
| sadness | sadness|
|
| 195 |
| surprise | surprise|
|
| 196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
dataset_info:
|
| 3 |
+
config_name: simplified_ekman
|
| 4 |
features:
|
| 5 |
- name: lt_text
|
| 6 |
dtype: string
|
|
|
|
| 64 |
download_size: 6057071
|
| 65 |
dataset_size: 8862855
|
| 66 |
configs:
|
| 67 |
+
- config_name: simplified_ekman
|
| 68 |
data_files:
|
| 69 |
- split: train
|
| 70 |
+
path: simplified_ekman/train-*
|
| 71 |
- split: validation
|
| 72 |
+
path: simplified_ekman/validation-*
|
| 73 |
- split: test
|
| 74 |
+
path: simplified_ekman/test-*
|
| 75 |
+
license: apache-2.0
|
| 76 |
task_categories:
|
| 77 |
- text-classification
|
| 78 |
language:
|
|
|
|
| 79 |
- lt
|
| 80 |
+
- en
|
| 81 |
---
|
|
|
|
| 82 |
|
| 83 |
+
# Lithuanian GoEmotions dataset
|
| 84 |
+
|
| 85 |
+
The original dataset: [GoEmotions](https://huggingface.co/datasets/google-research-datasets/go_emotions) ([paper](https://aclanthology.org/2020.acl-main.372/)).
|
| 86 |
+
|
| 87 |
+
The derived dataset was machine translated from English into Lithuanian using the free Google Translate API (with [deep-translator](https://pypi.org/project/deep-translator/)). The translation script:
|
| 88 |
|
|
|
|
| 89 |
|
|
|
|
| 90 |
```python
|
| 91 |
from datasets import load_dataset
|
| 92 |
from deep_translator import GoogleTranslator
|
|
|
|
| 103 |
translated_batch = translator.translate_batch(original_text)
|
| 104 |
break
|
| 105 |
except TranslationNotFound:
|
|
|
|
| 106 |
print(f"Translation failed. Retrying...")
|
| 107 |
+
|
| 108 |
# We fix untranslated entries (None values) by replacing them with the original text
|
| 109 |
for i in range(len(translated_batch)):
|
| 110 |
if not translated_batch[i]:
|
| 111 |
translated_batch[i] = original_text[i]
|
| 112 |
print(f"Replaced {original_text[i]} vs {translated_batch[i]}")
|
| 113 |
+
|
| 114 |
+
batch["lv_text"] = translated_batch
|
| 115 |
+
|
| 116 |
return batch
|
| 117 |
|
| 118 |
translated_dataset = original_dataset.map(
|
|
|
|
| 120 |
)
|
| 121 |
```
|
| 122 |
|
| 123 |
+
The derived dataset uses two aligned tagsets:
|
| 124 |
+
|
| 125 |
+
- The original 27 + `neutral` emotion labels (may contain more than one label per sample):
|
| 126 |
```yaml
|
| 127 |
0: admiration
|
| 128 |
1: amusement
|
|
|
|
| 154 |
27: neutral
|
| 155 |
```
|
| 156 |
|
| 157 |
+
- The basic 6 + `neutral` emotion labels as per [Paul Ekman's theory](https://en.wikipedia.org/wiki/Emotion_classification) (may contain more than one label per sample):
|
| 158 |
```yaml
|
| 159 |
0: anger
|
| 160 |
1: disgust
|
|
|
|
| 165 |
6: neutral
|
| 166 |
```
|
| 167 |
|
| 168 |
+
Mapping from the 27 fine-grained emotions to the 6 basic emotions:
|
| 169 |
+
|
| 170 |
+
|GoEmotions|Ekman|
|
| 171 |
|---|---|
|
| 172 |
| admiration | joy|
|
| 173 |
| amusement | joy|
|
|
|
|
| 196 |
| remorse | sadness|
|
| 197 |
| sadness | sadness|
|
| 198 |
| surprise | surprise|
|
| 199 |
+
|
| 200 |
+
## Acknowledgements
|
| 201 |
+
|
| 202 |
+
This work was supported by the EU Recovery and Resilience Facility project [Language Technology Initiative](https://www.vti.lu.lv) (2.3.1.1.i.0/1/22/I/CFLA/002).
|
{google_translator → simplified_ekman}/test-00000-of-00001.parquet
RENAMED
|
File without changes
|
{google_translator → simplified_ekman}/train-00000-of-00001.parquet
RENAMED
|
File without changes
|
{google_translator → simplified_ekman}/validation-00000-of-00001.parquet
RENAMED
|
File without changes
|