Blanca commited on
Commit
7b4d336
1 Parent(s): d5a7b3e

initial data release

Browse files
Files changed (3) hide show
  1. CaSET-catalan-stance-emotions-twitter.py +108 -0
  2. README.md +135 -1
  3. data.jsonl +0 -0
CaSET-catalan-stance-emotions-twitter.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Loading script for the ReviewsFinder dataset.
2
+
3
+
4
+ import json
5
+ import csv
6
+
7
+ import datasets
8
+
9
+
10
+ logger = datasets.logging.get_logger(__name__)
11
+
12
+
13
+ _CITATION = """ """
14
+
15
+
16
+ _DESCRIPTION = """ """
17
+
18
+
19
+ _HOMEPAGE = """ """
20
+
21
+
22
+
23
+ _URL = "https://huggingface.co/datasets/projecte-aina/CaSET-catalan-stance-emotions-twitter/resolve/main/"
24
+ _FILE = "data.jsonl"
25
+
26
+
27
+ class CaSETConfig(datasets.BuilderConfig):
28
+ """ Builder config for the CaSET dataset """
29
+
30
+ def __init__(self, **kwargs):
31
+ """BuilderConfig for CaSET.
32
+ Args:
33
+ **kwargs: keyword arguments forwarded to super.
34
+ """
35
+ super(CaSETConfig, self).__init__(**kwargs)
36
+
37
+
38
+ class CaSET(datasets.GeneratorBasedBuilder):
39
+ """ CaSET Dataset """
40
+
41
+
42
+ BUILDER_CONFIGS = [
43
+ CaSETConfig(
44
+ name="CaSET",
45
+ version=datasets.Version("1.0.0"),
46
+ description="CaSET dataset",
47
+ ),
48
+ ]
49
+
50
+
51
+ def _info(self):
52
+ return datasets.DatasetInfo(
53
+ description=_DESCRIPTION,
54
+ features=datasets.Features(
55
+ {"id_original": datasets.Value("string"),
56
+ "id_answer": datasets.Value("string"),
57
+ "original_text": datasets.Value("string"),
58
+ "answer_text": datasets.Value("string"),
59
+ "topic": datasets.features.ClassLabel
60
+ (names=
61
+ ['aeroport',
62
+ 'vaccines',
63
+ 'lloguer',
64
+ 'benidormfest',
65
+ 'subrogada'
66
+ ]
67
+ ),
68
+ "dynamic_stance": datasets.features.ClassLabel
69
+ (names=
70
+ ['Agree', 'Disagree', 'Elaborate', 'Query', 'Neutral', 'Unrelated', 'NA'
71
+ ]
72
+ ),
73
+ "original_stance": datasets.features.ClassLabel
74
+ (names=
75
+ ['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
76
+ ]
77
+ ),
78
+ "answer_stance": datasets.features.ClassLabel
79
+ (names=
80
+ ['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
81
+ ]
82
+ ),
83
+ "original_emotion": datasets.Value("list"),
84
+ "answer_emotion": datasets.Value("list"),
85
+ }
86
+ ),
87
+ homepage=_HOMEPAGE,
88
+ citation=_CITATION,
89
+ )
90
+
91
+ def _generate_examples(self, filepath):
92
+ """This function returns the examples in the raw (text) form."""
93
+ logger.info("generating examples from = %s", filepath)
94
+ with open(filepath, encoding="utf-8") as f:
95
+ data = [json.loads(line) for line in f]
96
+ for id_, pair in enumerate(data):
97
+ yield id_, {
98
+ "id_original": pair["id_original"],
99
+ "id_answer": pair["id_answer"],
100
+ "original_text":pair["original_text"],
101
+ "answer_text": pair["answer_text"],
102
+ "topic": pair["topic"],
103
+ "dynamic_stance": pair["dynamic_stance"],
104
+ "original_stance": pair["original_stance"],
105
+ "answer_stance": pair["answer_stance"],
106
+ "original_emotion": pair["original_emotion"],
107
+ "answer_emotion": pair["answer_emotion"],
108
+ }
README.md CHANGED
@@ -1,3 +1,137 @@
1
  ---
2
- license: cc-by-nc-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ annotations_creators:
3
+ - Barcelona Supercomputing Center
4
+ language_creators:
5
+ - Twitter
6
+ language:
7
+ - ca
8
+ license:
9
+ - cc-by-nc-4.0
10
+ multilinguality:
11
+ - monolingual
12
+ pretty_name: CaSET
13
+ size_categories:
14
+ - ?
15
+ task_categories:
16
+ - text-classification
17
+ task_ids: []
18
  ---
19
+
20
+ # Dataset Card for CaSET, the Catalan Stance and Emotions Dataset
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@bsc.es](blanca.calvo@bsc.es)
49
+
50
+ ### Dataset Summary
51
+
52
+
53
+ ### Supported Tasks and Leaderboards
54
+
55
+
56
+ ### Languages
57
+
58
+ The dataset is in Catalan (`ca-CA`).
59
+
60
+ ## Dataset Structure
61
+
62
+
63
+ ### Data Instances
64
+
65
+ ```
66
+
67
+ ```
68
+
69
+ ### Data Splits
70
+
71
+ The dataset does not contain splits.
72
+
73
+ ## Dataset Creation
74
+
75
+ ### Curation Rationale
76
+
77
+ We created this corpus to contribute to the development of language models in Catalan, a low-resource language.
78
+
79
+ ### Source Data
80
+
81
+ #### Initial Data Collection and Normalization
82
+
83
+ The data was collected by the Barcelona Supercomptuing Center.
84
+
85
+ #### Who are the source language producers?
86
+
87
+ The data was collected using the Twitter API.
88
+
89
+ ### Annotations
90
+
91
+
92
+ #### Annotation process
93
+
94
+ [N/A]
95
+
96
+ #### Who are the annotators?
97
+
98
+ [N/A]
99
+
100
+ ### Personal and Sensitive Information
101
+
102
+ ## Considerations for Using the Data
103
+
104
+ ### Social Impact of Dataset
105
+
106
+ We hope this corpus contributes to the development of language models in Catalan, a low-resource language.
107
+
108
+ ### Discussion of Biases
109
+
110
+ 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.
111
+
112
+ ### Other Known Limitations
113
+
114
+ [N/A]
115
+
116
+ ## Additional Information
117
+
118
+ ### Dataset Curators
119
+
120
+ Language Technologies Unit (LangTech) at the Barcelona Supercomputing Center.
121
+
122
+ 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).
123
+
124
+
125
+ ### Licensing Information
126
+
127
+ [Creative Commons Attribution Non-commercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/).
128
+
129
+ ### Citation Information
130
+
131
+ ```
132
+
133
+ ```
134
+
135
+ ### Contributions
136
+
137
+
data.jsonl ADDED
The diff for this file is too large to render. See raw diff