system HF staff commited on
Commit
28c578e
0 Parent(s):

Update files from the datasets library (from 1.13.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.13.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ - ar
9
+ - es
10
+ licenses:
11
+ - unknown
12
+ multilinguality:
13
+ - multilingual
14
+ pretty_name: 'SemEval-2018 Task 1: Affect in Tweets'
15
+ size_categories:
16
+ - 1K<n<10K
17
+ source_datasets:
18
+ - original
19
+ task_categories:
20
+ - text-classification
21
+ task_ids:
22
+ - multi-label-classification
23
+ - text-classification-other-emotion-classification
24
+ ---
25
+
26
+ # Dataset Card for SemEval-2018 Task 1: Affect in Tweets
27
+
28
+ ## Table of Contents
29
+ - [Table of Contents](#table-of-contents)
30
+ - [Dataset Description](#dataset-description)
31
+ - [Dataset Summary](#dataset-summary)
32
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
33
+ - [Languages](#languages)
34
+ - [Dataset Structure](#dataset-structure)
35
+ - [Data Instances](#data-instances)
36
+ - [Data Fields](#data-fields)
37
+ - [Data Splits](#data-splits)
38
+ - [Dataset Creation](#dataset-creation)
39
+ - [Curation Rationale](#curation-rationale)
40
+ - [Source Data](#source-data)
41
+ - [Annotations](#annotations)
42
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
43
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
44
+ - [Social Impact of Dataset](#social-impact-of-dataset)
45
+ - [Discussion of Biases](#discussion-of-biases)
46
+ - [Other Known Limitations](#other-known-limitations)
47
+ - [Additional Information](#additional-information)
48
+ - [Dataset Curators](#dataset-curators)
49
+ - [Licensing Information](#licensing-information)
50
+ - [Citation Information](#citation-information)
51
+ - [Contributions](#contributions)
52
+
53
+ ## Dataset Description
54
+
55
+ - **Homepage: https://competitions.codalab.org/competitions/17751**
56
+ - **Repository:**
57
+ - **Paper: http://saifmohammad.com/WebDocs/semeval2018-task1.pdf**
58
+ - **Leaderboard:**
59
+ - **Point of Contact: https://www.saifmohammad.com/**
60
+
61
+ ### Dataset Summary
62
+
63
+ Tasks: We present an array of tasks where systems have to automatically determine the intensity of emotions (E) and intensity of sentiment (aka valence V) of the tweeters from their tweets. (The term tweeter refers to the person who has posted the tweet.) We also include a multi-label emotion classification task for tweets. For each task, we provide separate training and test datasets for English, Arabic, and Spanish tweets. The individual tasks are described below:
64
+
65
+ 1. EI-reg (an emotion intensity regression task): Given a tweet and an emotion E, determine the intensity of E that best represents the mental state of the tweeter—a real-valued score between 0 (least E) and 1 (most E).
66
+ Separate datasets are provided for anger, fear, joy, and sadness.
67
+
68
+ 2. EI-oc (an emotion intensity ordinal classification task): Given a tweet and an emotion E, classify the tweet into one of four ordinal classes of intensity of E that best represents the mental state of the tweeter.
69
+ Separate datasets are provided for anger, fear, joy, and sadness.
70
+
71
+ 3. V-reg (a sentiment intensity regression task): Given a tweet, determine the intensity of sentiment or valence (V) that best represents the mental state of the tweeter—a real-valued score between 0 (most negative) and 1 (most positive).
72
+
73
+ 4. V-oc (a sentiment analysis, ordinal classification, task): Given a tweet, classify it into one of seven ordinal classes, corresponding to various levels of positive and negative sentiment intensity, that best represents the mental state of the tweeter.
74
+
75
+ 5. E-c (an emotion classification task): Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.
76
+ Here, E refers to emotion, EI refers to emotion intensity, V refers to valence or sentiment intensity, reg refers to regression, oc refers to ordinal classification, c refers to classification.
77
+
78
+ Together, these tasks encompass various emotion and sentiment analysis tasks. You are free to participate in any number of tasks and on any of the datasets.
79
+
80
+ **Currently only the subtask 5 (E-c) is available on the Hugging Face Dataset Hub.**
81
+
82
+ ### Supported Tasks and Leaderboards
83
+
84
+ ### Languages
85
+
86
+ English, Arabic and Spanish
87
+
88
+ ## Dataset Structure
89
+
90
+ ### Data Instances
91
+
92
+ An example from the `subtask5.english` config is:
93
+
94
+ ```
95
+ {'ID': '2017-En-21441',
96
+ 'Tweet': "“Worry is a down payment on a problem you may never have'. \xa0Joyce Meyer. #motivation #leadership #worry",
97
+ 'anger': False,
98
+ 'anticipation': True,
99
+ 'disgust': False,
100
+ 'fear': False,
101
+ 'joy': False,
102
+ 'love': False,
103
+ 'optimism': True,
104
+ 'pessimism': False,
105
+ 'sadness': False,
106
+ 'surprise': False,
107
+ 'trust': True}
108
+ ```
109
+
110
+ ### Data Fields
111
+
112
+ For any config of the subtask 5:
113
+ - ID: string id of the tweet
114
+ - Tweet: text content of the tweet as a string
115
+ - anger: boolean, True if anger represents the mental state of the tweeter
116
+ - anticipation: boolean, True if anticipation represents the mental state of the tweeter
117
+ - disgust: boolean, True if disgust represents the mental state of the tweeter
118
+ - fear: boolean, True if fear represents the mental state of the tweeter
119
+ - joy: boolean, True if joy represents the mental state of the tweeter
120
+ - love: boolean, True if love represents the mental state of the tweeter
121
+ - optimism: boolean, True if optimism represents the mental state of the tweeter
122
+ - pessimism: boolean, True if pessimism represents the mental state of the tweeter
123
+ - sadness: boolean, True if sadness represents the mental state of the tweeter
124
+ - surprise: boolean, True if surprise represents the mental state of the tweeter
125
+ - trust: boolean, True if trust represents the mental state of the tweeter
126
+
127
+ Note that the test set has no labels, and therefore all labels are set to False.
128
+
129
+ ### Data Splits
130
+
131
+ | | Tain | Dev | Test |
132
+ | ----- | ------ | ----- | ---- |
133
+ | English | 6,838 | 886 | 3,259|
134
+ | Arabic | 2,278 | 585 | 1,518|
135
+ | Spanish | 3,561 | 679 | 2,854|
136
+
137
+
138
+ ## Dataset Creation
139
+
140
+ ### Curation Rationale
141
+
142
+ ### Source Data
143
+
144
+ Tweets
145
+
146
+ #### Initial Data Collection and Normalization
147
+
148
+ #### Who are the source language producers?
149
+
150
+ Twitter users.
151
+
152
+ ### Annotations
153
+
154
+ #### Annotation process
155
+
156
+ We presented one tweet at a time to the annotators
157
+ and asked which of the following options best de-
158
+ scribed the emotional state of the tweeter:
159
+ – anger (also includes annoyance, rage)
160
+ – anticipation (also includes interest, vigilance)
161
+ – disgust (also includes disinterest, dislike, loathing)
162
+ – fear (also includes apprehension, anxiety, terror)
163
+ – joy (also includes serenity, ecstasy)
164
+ – love (also includes affection)
165
+ – optimism (also includes hopefulness, confidence)
166
+ – pessimism (also includes cynicism, no confidence)
167
+ – sadness (also includes pensiveness, grief)
168
+ – surprise (also includes distraction, amazement)
169
+ – trust (also includes acceptance, liking, admiration)
170
+ – neutral or no emotion
171
+ Example tweets were provided in advance with ex-
172
+ amples of suitable responses.
173
+ On the Figure Eight task settings, we specified
174
+ that we needed annotations from seven people for
175
+ each tweet. However, because of the way the gold
176
+ tweets were set up, they were annotated by more
177
+ than seven people. The median number of anno-
178
+ tations was still seven. In total, 303 people anno-
179
+ tated between 10 and 4,670 tweets each. A total of
180
+ 174,356 responses were obtained.
181
+
182
+ Mohammad, S., Bravo-Marquez, F., Salameh, M., & Kiritchenko, S. (2018). SemEval-2018 task 1: Affect in tweets. Proceedings of the 12th International Workshop on Semantic Evaluation, 1–17. https://doi.org/10.18653/v1/S18-1001
183
+
184
+ #### Who are the annotators?
185
+
186
+ Crowdworkers on Figure Eight.
187
+
188
+ ### Personal and Sensitive Information
189
+
190
+ ## Considerations for Using the Data
191
+
192
+ ### Social Impact of Dataset
193
+
194
+ ### Discussion of Biases
195
+
196
+ ### Other Known Limitations
197
+
198
+ ## Additional Information
199
+
200
+ ### Dataset Curators
201
+
202
+ Saif M. Mohammad, Felipe Bravo-Marquez, Mohammad Salameh and Svetlana Kiritchenko
203
+
204
+ ### Licensing Information
205
+
206
+ See the official [Terms and Conditions](https://competitions.codalab.org/competitions/17751#learn_the_details-terms_and_conditions)
207
+
208
+ ### Citation Information
209
+
210
+ @InProceedings{SemEval2018Task1,
211
+ author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},
212
+ title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},
213
+ booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},
214
+ address = {New Orleans, LA, USA},
215
+ year = {2018}}
216
+
217
+ ### Contributions
218
+
219
+ Thanks to [@maxpel](https://github.com/maxpel) for adding this dataset.
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"subtask5.english": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.english", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 809768, "num_examples": 6838, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 384519, "num_examples": 3259, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 104660, "num_examples": 886, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-train.zip": {"num_bytes": 359408, "checksum": "7a64a0ffc7d54505ae6556d17d37ad56bd8817ef5724c6e3782909e3a3bca0ae"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-dev.zip": {"num_bytes": 48375, "checksum": "3279ba27452162b1ce0f58b23442ca3fb57c749c3dae7944cbda3ea0984c8a1e"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018englishtestfiles/2018-E-c-En-test.zip": {"num_bytes": 174899, "checksum": "9afa650190d749561749348e360fd1fc0d0a80c5f374d12cc5ef4b9a9ffc4430"}}, "download_size": 582682, "post_processing_size": null, "dataset_size": 1298947, "size_in_bytes": 1881629}, "subtask5.spanish": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.spanish", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 362549, "num_examples": 3561, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 288692, "num_examples": 2854, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 67259, "num_examples": 679, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-train.zip": {"num_bytes": 156975, "checksum": "28547e933b3087b8a82d7997e15021ef2f3680f6a1b134ca41766ce44034a276"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-dev.zip": {"num_bytes": 30152, "checksum": "399cd39ae7dc00b11b2f319dfbb9360614e86c92898318fdfd06af46a81f5ebe"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018spanishtestfiles/2018-E-c-Es-test.zip": {"num_bytes": 126924, "checksum": "3909e38a167ec40250b0b78f254e03fc3fb79ac7790bce6b695ef273a1d289d1"}}, "download_size": 314051, "post_processing_size": null, "dataset_size": 718500, "size_in_bytes": 1032551}, "subtask5.arabic": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.arabic", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 414458, "num_examples": 2278, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 278715, "num_examples": 1518, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 105452, "num_examples": 585, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-train.zip": {"num_bytes": 142792, "checksum": "cd25acadaf262e1e8dfb27c4d12f392ccb9caf648933a183fc0c83255a86f4a1"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-dev.zip": {"num_bytes": 37428, "checksum": "177e1eee9967cd5dd4b4853ef0cde694b9c20a7b4eb8bfbcb82b11d53cbd30f9"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018arabictestfiles/2018-E-c-Ar-test.zip": {"num_bytes": 97606, "checksum": "4f1fc9f082c08c29b0acec180ebcb10ff425b96c117d8aa86a13ea092fce59f3"}}, "download_size": 277826, "post_processing_size": null, "dataset_size": 798625, "size_in_bytes": 1076451}}
dummy/subtask5.arabic/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d05b1db3c9e7c239d0dedfcf6d819236df5f5c7a8f24c8a4f73aa8eef40b43d
3
+ size 2424
dummy/subtask5.english/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a220918ffe6a80c0e5cfab1a807278dc657ee07a1b5f11517822ff6f011b6aba
3
+ size 2258
dummy/subtask5.spanish/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d10c00e90e2e4411b48717fb45af9030b175fa0c7188dac1769427dcacba211d
3
+ size 2155
sem_eval_2018_task_1.py ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ import os
17
+
18
+ import datasets
19
+
20
+
21
+ _CITATION = """\
22
+ @InProceedings{SemEval2018Task1,
23
+ author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},
24
+ title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},
25
+ booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},
26
+ address = {New Orleans, LA, USA},
27
+ year = {2018}}
28
+ """
29
+
30
+ _DESCRIPTION = """\
31
+ SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.
32
+ This is a dataset for multilabel emotion classification for tweets.
33
+ 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'
34
+ It contains 22467 tweets in three languages manually annotated by crowdworkers using Best–Worst Scaling.
35
+ """
36
+
37
+ _HOMEPAGE = "https://competitions.codalab.org/competitions/17751"
38
+
39
+ _LICENSE = ""
40
+
41
+ _URLs = {
42
+ "subtask5.english": [
43
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-train.zip",
44
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-dev.zip",
45
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018englishtestfiles/2018-E-c-En-test.zip",
46
+ ],
47
+ "subtask5.spanish": [
48
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-train.zip",
49
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-dev.zip",
50
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018spanishtestfiles/2018-E-c-Es-test.zip",
51
+ ],
52
+ "subtask5.arabic": [
53
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-train.zip",
54
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-dev.zip",
55
+ "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018arabictestfiles/2018-E-c-Ar-test.zip",
56
+ ],
57
+ }
58
+
59
+
60
+ class SemEval2018Task1(datasets.GeneratorBasedBuilder):
61
+
62
+ VERSION = datasets.Version("1.1.0")
63
+
64
+ BUILDER_CONFIGS = [
65
+ datasets.BuilderConfig(
66
+ name="subtask5.english",
67
+ version=VERSION,
68
+ description="This is the English dataset of subtask 5: E-c: Detecting Emotions.",
69
+ ),
70
+ datasets.BuilderConfig(
71
+ name="subtask5.spanish",
72
+ version=VERSION,
73
+ description="This is the Spanish dataset of subtask 5: E-c: Detecting Emotions.",
74
+ ),
75
+ datasets.BuilderConfig(
76
+ name="subtask5.arabic",
77
+ version=VERSION,
78
+ description="This is the Arabic dataset of subtask 5: E-c: Detecting Emotions.",
79
+ ),
80
+ ]
81
+
82
+ def _info(self):
83
+ features = datasets.Features(
84
+ {
85
+ "ID": datasets.Value("string"),
86
+ "Tweet": datasets.Value("string"),
87
+ "anger": datasets.Value("bool"),
88
+ "anticipation": datasets.Value("bool"),
89
+ "disgust": datasets.Value("bool"),
90
+ "fear": datasets.Value("bool"),
91
+ "joy": datasets.Value("bool"),
92
+ "love": datasets.Value("bool"),
93
+ "optimism": datasets.Value("bool"),
94
+ "pessimism": datasets.Value("bool"),
95
+ "sadness": datasets.Value("bool"),
96
+ "surprise": datasets.Value("bool"),
97
+ "trust": datasets.Value("bool"),
98
+ }
99
+ )
100
+
101
+ return datasets.DatasetInfo(
102
+ description=_DESCRIPTION,
103
+ features=features,
104
+ supervised_keys=None,
105
+ homepage=_HOMEPAGE,
106
+ license=_LICENSE,
107
+ citation=_CITATION,
108
+ )
109
+
110
+ def _split_generators(self, dl_manager):
111
+ """Returns SplitGenerators."""
112
+ my_urls = _URLs[self.config.name]
113
+ if self.config.name == "subtask5.english":
114
+ shortname = "En"
115
+ if self.config.name == "subtask5.spanish":
116
+ shortname = "Es"
117
+ if self.config.name == "subtask5.arabic":
118
+ shortname = "Ar"
119
+ data_dir = dl_manager.download_and_extract(my_urls)
120
+ return [
121
+ datasets.SplitGenerator(
122
+ name=datasets.Split.TRAIN,
123
+ gen_kwargs={
124
+ "filepath": os.path.join(data_dir[0], "2018-E-c-" + shortname + "-train.txt"),
125
+ "split": "train",
126
+ },
127
+ ),
128
+ datasets.SplitGenerator(
129
+ name=datasets.Split.TEST,
130
+ gen_kwargs={
131
+ "filepath": os.path.join(data_dir[2], "2018-E-c-" + shortname + "-test.txt"),
132
+ "split": "test",
133
+ },
134
+ ),
135
+ datasets.SplitGenerator(
136
+ name=datasets.Split.VALIDATION,
137
+ gen_kwargs={
138
+ "filepath": os.path.join(data_dir[1], "2018-E-c-" + shortname + "-dev.txt"),
139
+ "split": "dev",
140
+ },
141
+ ),
142
+ ]
143
+
144
+ def _generate_examples(self, filepath, split):
145
+ """Yields examples as (key, example) tuples."""
146
+
147
+ with open(filepath, encoding="utf-8") as f:
148
+ next(f) # skip header
149
+ for id_, row in enumerate(f):
150
+ data = row.split("\t")
151
+ yield id_, {
152
+ "ID": data[0],
153
+ "Tweet": data[1],
154
+ "anger": int(data[2]) if split != "test" else None,
155
+ "anticipation": int(data[3]) if split != "test" else None,
156
+ "disgust": int(data[4]) if split != "test" else None,
157
+ "fear": int(data[5]) if split != "test" else None,
158
+ "joy": int(data[6]) if split != "test" else None,
159
+ "love": int(data[7]) if split != "test" else None,
160
+ "optimism": int(data[8]) if split != "test" else None,
161
+ "pessimism": int(data[9]) if split != "test" else None,
162
+ "sadness": int(data[10]) if split != "test" else None,
163
+ "surprise": int(data[11]) if split != "test" else None,
164
+ "trust": int(data[12]) if split != "test" else None,
165
+ }