Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Languages:
Catalan
Size:
10K - 100K
DOI:
License:
data release
Browse files- CaSERA-catalan-stance-emotions-raco.py +96 -0
- README.md +151 -1
- data.jsonl +0 -0
CaSERA-catalan-stance-emotions-raco.py
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Loading script for the ReviewsFinder dataset.
|
2 |
+
|
3 |
+
|
4 |
+
import json
|
5 |
+
|
6 |
+
import datasets
|
7 |
+
|
8 |
+
|
9 |
+
logger = datasets.logging.get_logger(__name__)
|
10 |
+
|
11 |
+
|
12 |
+
_CITATION = """ """
|
13 |
+
|
14 |
+
|
15 |
+
_DESCRIPTION = """ """
|
16 |
+
|
17 |
+
|
18 |
+
_HOMEPAGE = """ https://huggingface.co/datasets/projecte-aina/CaSERA-catalan-stance-emotions-raco """
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
_URL = "https://huggingface.co/datasets/projecte-aina/CaSERA-catalan-stance-emotions-raco/resolve/main/"
|
23 |
+
_FILE = "data.jsonl"
|
24 |
+
|
25 |
+
|
26 |
+
class CaSERAConfig(datasets.BuilderConfig):
|
27 |
+
""" Builder config for the CaSERA dataset """
|
28 |
+
|
29 |
+
def __init__(self, **kwargs):
|
30 |
+
"""BuilderConfig for CaSERA.
|
31 |
+
Args:
|
32 |
+
**kwargs: keyword arguments forwarded to super.
|
33 |
+
"""
|
34 |
+
super(CaSERAConfig, self).__init__(**kwargs)
|
35 |
+
|
36 |
+
|
37 |
+
class CaSERA(datasets.GeneratorBasedBuilder):
|
38 |
+
""" CaSERA Dataset """
|
39 |
+
|
40 |
+
|
41 |
+
BUILDER_CONFIGS = [
|
42 |
+
CaSERAConfig(
|
43 |
+
name="CaSERA",
|
44 |
+
version=datasets.Version("1.0.0"),
|
45 |
+
description="CaSERA dataset",
|
46 |
+
),
|
47 |
+
]
|
48 |
+
|
49 |
+
|
50 |
+
def _info(self):
|
51 |
+
return datasets.DatasetInfo(
|
52 |
+
description=_DESCRIPTION,
|
53 |
+
features=datasets.Features(
|
54 |
+
{"id_original": datasets.Value("string"),
|
55 |
+
"id_answer": datasets.Value("string"),
|
56 |
+
"original_text": datasets.Value("string"),
|
57 |
+
"answer_text": datasets.Value("string"),
|
58 |
+
"dynamic_stance": datasets.features.ClassLabel
|
59 |
+
(names=
|
60 |
+
['Agree', 'Disagree', 'Elaborate', 'Query', 'Neutral', 'Unrelated', 'NA'
|
61 |
+
]
|
62 |
+
),
|
63 |
+
"original_emotion": datasets.Value("string"),
|
64 |
+
"answer_emotion": datasets.Value("string"),
|
65 |
+
}
|
66 |
+
),
|
67 |
+
homepage=_HOMEPAGE,
|
68 |
+
citation=_CITATION,
|
69 |
+
)
|
70 |
+
|
71 |
+
def _split_generators(self, dl_manager):
|
72 |
+
"""Returns SplitGenerators."""
|
73 |
+
urls_to_download = {
|
74 |
+
"data": f"{_URL}{_FILE}",
|
75 |
+
}
|
76 |
+
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
77 |
+
|
78 |
+
return [
|
79 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["data"]}),
|
80 |
+
]
|
81 |
+
|
82 |
+
def _generate_examples(self, filepath):
|
83 |
+
"""This function returns the examples in the raw (text) form."""
|
84 |
+
logger.info("generating examples from = %s", filepath)
|
85 |
+
with open(filepath, encoding="utf-8") as f:
|
86 |
+
data = [json.loads(line) for line in f]
|
87 |
+
for id_, pair in enumerate(data):
|
88 |
+
yield id_, {
|
89 |
+
"id_original": pair["id_original"],
|
90 |
+
"id_answer": pair["id_answer"],
|
91 |
+
"original_text":pair["original_text"],
|
92 |
+
"answer_text": pair["answer_text"],
|
93 |
+
"dynamic_stance": pair["dynamic_stance"],
|
94 |
+
"original_emotion": pair["original_emotion"],
|
95 |
+
"answer_emotion": pair["answer_emotion"],
|
96 |
+
}
|
README.md
CHANGED
@@ -1,3 +1,153 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
annotations_creators:
|
3 |
+
- Barcelona Supercomputing Center
|
4 |
+
language_creators:
|
5 |
+
- Racó Català
|
6 |
+
language:
|
7 |
+
- ca
|
8 |
+
license:
|
9 |
+
- cc-by-nc-4.0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
pretty_name: CaSERA
|
13 |
+
size_categories:
|
14 |
+
- ?
|
15 |
+
task_categories:
|
16 |
+
- text-classification
|
17 |
+
task_ids: []
|
18 |
---
|
19 |
+
|
20 |
+
# Dataset Card for CaSERA, the Catalan Stance and Emotions Dataset from Racó Català
|
21 |
+
|
22 |
+
## Table of Contents
|
23 |
+
- [Table of Contents](#table-of-contents)
|
24 |
+
- [Dataset Description](#dataset-description)
|
25 |
+
- [Dataset Summary](#dataset-summary)
|
26 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
27 |
+
- [Languages](#languages)
|
28 |
+
- [Dataset Structure](#dataset-structure)
|
29 |
+
- [Data Instances](#data-instances)
|
30 |
+
- [Data Fields](#data-fields)
|
31 |
+
- [Data Splits](#data-splits)
|
32 |
+
- [Dataset Creation](#dataset-creation)
|
33 |
+
- [Curation Rationale](#curation-rationale)
|
34 |
+
- [Annotations](#annotations)
|
35 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
36 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
37 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
38 |
+
- [Discussion of Biases](#discussion-of-biases)
|
39 |
+
- [Other Known Limitations](#other-known-limitations)
|
40 |
+
- [Additional Information](#additional-information)
|
41 |
+
- [Dataset Curators](#dataset-curators)
|
42 |
+
- [Licensing Information](#licensing-information)
|
43 |
+
- [Citation Information](#citation-information)
|
44 |
+
- [Contributions](#contributions)
|
45 |
+
|
46 |
+
## Dataset Description
|
47 |
+
|
48 |
+
- **Point of Contact:** [Blanca Calvo](aina@bsc.es)
|
49 |
+
|
50 |
+
### Dataset Summary
|
51 |
+
|
52 |
+
The CaSERA dataset is a Catalan corpus from the forum Racó Català annotated with Emotions and Dynamic Stance. The dataset contains 15.782 unique sentence grouped in 10.745 pairs of sentences, paired as original messages and answers to these messages.
|
53 |
+
|
54 |
+
### Supported Tasks and Leaderboards
|
55 |
+
|
56 |
+
This dataset can be used to train models for emotion detection and dynamic stance detection.
|
57 |
+
|
58 |
+
### Languages
|
59 |
+
|
60 |
+
The dataset is in Catalan (`ca-CA`).
|
61 |
+
|
62 |
+
## Dataset Structure
|
63 |
+
|
64 |
+
Each instance in the dataset is a pair of original-answer messages annotated with the relation between the two messages (the dynamic stance). For each message there is an individual id and the emotions identified in the message.
|
65 |
+
|
66 |
+
### Data Instances
|
67 |
+
|
68 |
+
```
|
69 |
+
{
|
70 |
+
"id_original": "782135",
|
71 |
+
"id_answer": "782135_2_2",
|
72 |
+
"original_text": "Alguns petits apunts que s'haurien de tenir en compte en la creació d'aquesta hipotètica grada jove: -Renúncia total i explícita a la violència, aquest per mi és el punt clau i bàsic que la directiva tindria en compte, sense renúncia no hi ha grup. -Edat de la gent: indispensable establir un mínim i un màxim d'edat per adquirir entrades de la grada jove, s'ha d'acabar amb els freaks de 40-50 anys amb esperit jove i ganes d\'animar (sona discriminatori, però crec que és òbvi que s'ha de limitar l'edat) -Seguretat bàsica: Agradi o no, s'hauria d'incrementar moltíssim la seguretat privada (és un dels punts que no agrada a la directiva). Els indesitjables de sempre no tolerarien cap grada jove sense ells. -Per tant doncs, absteniu-vos i oblideu-vos tots els hooligans potencials (n'hi ha a grapats per tot Catalunya) de crear una grada hooligan amb skins, punkis i resta d'estètiques "característiques", també seria un punt clau (confirmat per un directiu!) En definitiva, ara per ara veig força difícil i inviable la creació d'una grada jove nombrosa i contundent, s'hauria d'optar per opcions més "descafeïnades" rotllo Sang Culé o Dracs.",
|
73 |
+
"answer_text": "Doncs si es creés una grada jove ja et dic jo que sompliria d'skins, i els primers en entrari serien els Boixos que han expulsat del seu lloc. Tot i aìxò que hi hagin skins no vol dir que hi hagi violència, no crec que es peguessin amb els del mateix equip. Si es creés un grada jove l'ambient al camp nou seria brutal, si 200 Boixos feien bivrar el camp nou, imaginat a 4000 perones o la gent que hi capigués a la grada jove.",
|
74 |
+
"dynamic_stance": "Elaborate",
|
75 |
+
"original_emotion": ["fear", "distrust", "anticipation"],
|
76 |
+
"answer_emotion": ["anger", "sadness", "fear", "distrust", "anticipation"]
|
77 |
+
}
|
78 |
+
```
|
79 |
+
|
80 |
+
### Data Splits
|
81 |
+
|
82 |
+
The dataset does not contain splits.
|
83 |
+
|
84 |
+
## Dataset Creation
|
85 |
+
|
86 |
+
### Curation Rationale
|
87 |
+
|
88 |
+
We created this corpus to contribute to the development of language models in Catalan, a low-resource language.
|
89 |
+
|
90 |
+
### Source Data
|
91 |
+
|
92 |
+
The data was collected using the messages of the forum Racó Català by the Barcelona Supercomputing Center.
|
93 |
+
|
94 |
+
#### Initial Data Collection and Normalization
|
95 |
+
|
96 |
+
The data was collected XXXX.
|
97 |
+
|
98 |
+
#### Who are the source language producers?
|
99 |
+
|
100 |
+
The source language producers are user of Racó Català.
|
101 |
+
|
102 |
+
### Annotations
|
103 |
+
|
104 |
+
- Emotions are annotated in a multi-label fashion. The labels can be: Anger, Anticipation, Disgust, Fear, Joy, Sadness, Surprise, Distrust.
|
105 |
+
|
106 |
+
- Dynamic stance is annotated per pair. The labels can be: Agree, Disagree, Elaborate, Query, Neutral, Unrelated, NA.
|
107 |
+
|
108 |
+
#### Annotation process
|
109 |
+
|
110 |
+
- For emotions there were 3 annotators. The gold labels are an aggregation of all the labels annotated by the 3. The IAA calculated with Fleiss' Kappa per label was, on average, 38.73.
|
111 |
+
|
112 |
+
- For dynamic stance there were 4 annotators. If at least 3 of the annotators disagreed, a fifth annotator chose the gold label. The overall Fleiss' Kappa between the 4 annotators was 57.63, and the average Fleiss' Kappa of the annotators with the gold labels is 85.98.
|
113 |
+
|
114 |
+
#### Who are the annotators?
|
115 |
+
|
116 |
+
All the annotators are native speakers of Catalan.
|
117 |
+
|
118 |
+
### Personal and Sensitive Information
|
119 |
+
|
120 |
+
The data was annonymised to remove user names and emails, which were changed to random Catalan names. The mentions to the chat itself have also been changed.
|
121 |
+
|
122 |
+
## Considerations for Using the Data
|
123 |
+
|
124 |
+
### Social Impact of Dataset
|
125 |
+
|
126 |
+
We hope this corpus contributes to the development of language models in Catalan, a low-resource language.
|
127 |
+
|
128 |
+
### Discussion of Biases
|
129 |
+
|
130 |
+
We are aware that, since the data comes from social media, this will contain biases, hate speech and toxic content. We have not applied any steps to reduce their impact.
|
131 |
+
|
132 |
+
### Other Known Limitations
|
133 |
+
|
134 |
+
## Additional Information
|
135 |
+
|
136 |
+
### Dataset Curators
|
137 |
+
|
138 |
+
Language Technologies Unit (LangTech) at the Barcelona Supercomputing Center.
|
139 |
+
|
140 |
+
This work was funded by the [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of [Projecte AINA](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina).
|
141 |
+
|
142 |
+
|
143 |
+
### Licensing Information
|
144 |
+
|
145 |
+
[Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/).
|
146 |
+
|
147 |
+
### Citation Information
|
148 |
+
|
149 |
+
```
|
150 |
+
|
151 |
+
```
|
152 |
+
|
153 |
+
### Contributions
|
data.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|