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

Update files from the datasets library (from 1.2.0)

Browse files

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

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +225 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.1.0/dummy_data.zip +3 -0
  5. metooma.py +133 -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,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ multilinguality:
9
+ - monolingual
10
+ size_categories:
11
+ - 1K<n<10K
12
+ source_datasets:
13
+ - original
14
+ task_categories:
15
+ - text-classification
16
+ - text-retrieval
17
+ task_ids:
18
+ - multi-class-classification
19
+ - multi-label-classification
20
+ ---
21
+
22
+ # Dataset Card for #MeTooMA dataset
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/JN4EYU
50
+ - **Paper:** https://ojs.aaai.org//index.php/ICWSM/article/view/7292
51
+ - **Point of Contact:** https://github.com/midas-research/MeTooMA
52
+
53
+
54
+ ### Dataset Summary
55
+
56
+ - The dataset consists of tweets belonging to #MeToo movement on Twitter, labelled into different categories.
57
+ - This dataset includes more data points and has more labels than any of the previous datasets that contain social media
58
+ posts about sexual abuse discloures. Please refer to the Related Datasets of the publication for a detailed information about this.
59
+ - Due to Twitters development policies, the authors provide only the tweet IDs and corresponding labels,
60
+ other data can be fetched via Twitter API.
61
+ - The data has been labelled by experts, with the majority taken into the account for deciding the final label.
62
+ - The authors provide these labels for each of the tweets.
63
+ - Relevance
64
+ - Directed Hate
65
+ - Generalized Hate
66
+ - Sarcasm
67
+ - Allegation
68
+ - Justification
69
+ - Refutation
70
+ - Support
71
+ - Oppose
72
+ - The definitions for each task/label is in the main publication.
73
+ - Please refer to the accompanying paper https://aaai.org/ojs/index.php/ICWSM/article/view/7292 for statistical analysis on the textual data
74
+ extracted from this dataset.
75
+ - The language of all the tweets in this dataset is English
76
+ - Time period: October 2018 - December 2018
77
+ - Suggested Use Cases of this dataset:
78
+ - Evaluating usage of linguistic acts such as: hate-spech and sarcasm in the incontext of public sexual abuse discloures.
79
+ - Extracting actionable insights and virtual dynamics of gender roles in sexual abuse revelations.
80
+ - Identifying how influential people were potrayed on public platform in the
81
+ events of mass social movements.
82
+ - Polarization analysis based on graph simulations of social nodes of users involved
83
+ in the #MeToo movement.
84
+
85
+
86
+ ### Supported Tasks and Leaderboards
87
+
88
+ Multi Label and Multi-Class Classification
89
+
90
+ ### Languages
91
+
92
+ English
93
+
94
+ ## Dataset Structure
95
+ - The dataset is structured into CSV format with TweetID and accompanying labels.
96
+ - Train and Test sets are split into respective files.
97
+
98
+ ### Data Instances
99
+
100
+ Tweet ID and the appropriate labels
101
+
102
+ ### Data Fields
103
+
104
+ Tweet ID and appropriate labels (binary label applicable for a data point) and multiple labels for each Tweet ID
105
+
106
+ ### Data Splits
107
+
108
+ - Train: 7979
109
+ - Test: 1996
110
+
111
+ ## Dataset Creation
112
+
113
+ ### Curation Rationale
114
+
115
+ - Twitter was the major source of all the public discloures of sexual abuse incidents during the #MeToo movement.
116
+ - People expressed their opinions over issues which were previously missing from the social media space.
117
+ - This provides an option to study the linguistic behaviours of social media users in an informal setting,
118
+ therefore the authors decide to curate this annotated dataset.
119
+ - The authors expect this dataset would be of great interest and use to both computational and socio-linguists.
120
+ - For computational linguists, it provides an opportunity to model three new complex dialogue acts (allegation, refutation, and justification) and also to study how these acts interact with some of the other linguistic components like stance, hate, and sarcasm. For socio-linguists, it provides an opportunity to explore how a movement manifests in social media.
121
+
122
+
123
+ ### Source Data
124
+ - Source of all the data points in this dataset is Twitter social media platform.
125
+
126
+ #### Initial Data Collection and Normalization
127
+
128
+ - All the tweets are mined from Twitter with initial search paramters identified using keywords from the #MeToo movement.
129
+ - Redundant keywords were removed based on manual inspection.
130
+ - Public streaming APIs of Twitter were used for querying with the selected keywords.
131
+ - Based on text de-duplication and cosine similarity score, the set of tweets were pruned.
132
+ - Non english tweets were removed.
133
+ - The final set was labelled by experts with the majority label taken into the account for deciding the final label.
134
+ - Please refer to this paper for detailed information: https://ojs.aaai.org//index.php/ICWSM/article/view/7292
135
+
136
+ #### Who are the source language producers?
137
+
138
+ Please refer to this paper for detailed information: https://ojs.aaai.org//index.php/ICWSM/article/view/7292
139
+
140
+ ### Annotations
141
+
142
+ #### Annotation process
143
+
144
+ - The authors chose against crowd sourcing for labeling this dataset due to its highly sensitive nature.
145
+ - The annotators are domain experts having degress in advanced clinical psychology and gender studies.
146
+ - They were provided a guidelines document with instructions about each task and its definitions, labels and examples.
147
+ - They studied the document, worked a few examples to get used to this annotation task.
148
+ - They also provided feedback for improving the class definitions.
149
+ - The annotation process is not mutually exclusive, implying that presence of one label does not mean the
150
+ absence of the other one.
151
+
152
+
153
+ #### Who are the annotators?
154
+
155
+ - The annotators are domain experts having a degree in clinical psychology and gender studies.
156
+ - Please refer to the accompnaying paper for a detailed annotation process.
157
+
158
+ ### Personal and Sensitive Information
159
+
160
+ - Considering Twitters policy for distribution of data, only Tweet ID and applicable labels are shared for the public use.
161
+ - It is highly encouraged to use this dataset for scientific purposes only.
162
+ - This dataset collection completely follows the Twitter mandated guidelines for distribution and usage.
163
+
164
+ ## Considerations for Using the Data
165
+
166
+ ### Social Impact of Dataset
167
+
168
+ - The authors of this dataset do not intend to conduct a population centric analysis of #MeToo movement on Twitter.
169
+ - The authors acknowledge that findings from this dataset cannot be used as-is for any direct social intervention, these
170
+ should be used to assist already existing human intervention tools and therapies.
171
+ - Enough care has been taken to ensure that this work comes of as trying to target a specific person for their
172
+ personal stance of issues pertaining to the #MeToo movement.
173
+ - The authors of this work do not aim to vilify anyone accused in the #MeToo movement in any manner.
174
+ - Please refer to the ethics and discussion section of the mentioned publication for appropriate sharing of this dataset
175
+ and social impact of this work.
176
+
177
+
178
+ ### Discussion of Biases
179
+
180
+ - The #MeToo movement acted as a catalyst for implementing social policy changes to benefit the members of
181
+ community affected by sexual abuse.
182
+ - Any work undertaken on this dataset should aim to minimize the bias against minority groups which
183
+ might amplified in cases of sudden outburst of public reactions over sensitive social media discussions.
184
+
185
+ ### Other Known Limitations
186
+
187
+ - Considering privacy concerns, social media practitioners should be aware of making automated interventions
188
+ to aid the victims of sexual abuse as some people might not prefer to disclose their notions.
189
+ - Concerned social media users might also repeal their social information, if they found out that their
190
+ information is being used for computational purposes, hence it is important seek subtle individual consent
191
+ before trying to profile authors involved in online discussions to uphold personal privacy.
192
+
193
+ ## Additional Information
194
+
195
+ Please refer to this link: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/JN4EYU
196
+
197
+ ### Dataset Curators
198
+
199
+ - If you use the corpus in a product or application, then please credit the authors
200
+ and [Multimodal Digital Media Analysis Lab - Indraprastha Institute of Information Technology, New Delhi]
201
+ (http://midas.iiitd.edu.in) appropriately.
202
+ Also, if you send us an email, we will be thrilled to know about how you have used the corpus.
203
+ - If interested in commercial use of the corpus, send email to midas@iiitd.ac.in.
204
+ - Multimodal Digital Media Analysis Lab - Indraprastha Institute of Information Technology, New Delhi, India
205
+ disclaims any responsibility for the use of the corpus and does not provide technical support.
206
+ However, the contact listed above will be happy to respond to queries and clarifications
207
+ - Please feel free to send us an email:
208
+ - with feedback regarding the corpus.
209
+ - with information on how you have used the corpus.
210
+ - if interested in having us analyze your social media data.
211
+ - if interested in a collaborative research project.
212
+
213
+ ### Licensing Information
214
+
215
+ [More Information Needed]
216
+
217
+ ### Citation Information
218
+
219
+ Please cite the following publication if you make use of the dataset: https://ojs.aaai.org/index.php/ICWSM/article/view/7292
220
+
221
+ ```
222
+
223
+ @article{Gautam_Mathur_Gosangi_Mahata_Sawhney_Shah_2020, title={#MeTooMA: Multi-Aspect Annotations of Tweets Related to the MeToo Movement}, volume={14}, url={https://aaai.org/ojs/index.php/ICWSM/article/view/7292}, abstractNote={&lt;p&gt;In this paper, we present a dataset containing 9,973 tweets related to the MeToo movement that were manually annotated for five different linguistic aspects: relevance, stance, hate speech, sarcasm, and dialogue acts. We present a detailed account of the data collection and annotation processes. The annotations have a very high inter-annotator agreement (0.79 to 0.93 k-alpha) due to the domain expertise of the annotators and clear annotation instructions. We analyze the data in terms of geographical distribution, label correlations, and keywords. Lastly, we present some potential use cases of this dataset. We expect this dataset would be of great interest to psycholinguists, socio-linguists, and computational linguists to study the discursive space of digitally mobilized social movements on sensitive issues like sexual harassment.&lt;/p&#38;gt;}, number={1}, journal={Proceedings of the International AAAI Conference on Web and Social Media}, author={Gautam, Akash and Mathur, Puneet and Gosangi, Rakesh and Mahata, Debanjan and Sawhney, Ramit and Shah, Rajiv Ratn}, year={2020}, month={May}, pages={209-216} }
224
+
225
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "The dataset consists of tweets belonging to #MeToo movement on Twitter, labelled into different categories.\nDue to Twitter's development policies, we only provide the tweet ID's and corresponding labels,\nother data can be fetched via Twitter API.\nThe data has been labelled by experts, with the majority taken into the account for deciding the final label.\nWe provide these labels for each of the tweets. The labels provided for each data point\nincludes -- Relevance, Directed Hate, Generalized Hate,\nSarcasm, Allegation, Justification, Refutation, Support, Oppose\n", "citation": "@inproceedings{gautam2020metooma,\n title={# MeTooMA: Multi-Aspect Annotations of Tweets Related to the MeToo Movement},\n author={Gautam, Akash and Mathur, Puneet and Gosangi, Rakesh and Mahata, Debanjan and Sawhney, Ramit and Shah, Rajiv Ratn},\n booktitle={Proceedings of the International AAAI Conference on Web and Social Media},\n volume={14},\n pages={209--216},\n year={2020} }\n", "homepage": "https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/JN4EYU", "license": "", "features": {"TweetId": {"dtype": "string", "id": null, "_type": "Value"}, "Text_Only_Informative": {"num_classes": 2, "names": ["Text Non Informative", "Text Informative"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Image_Only_Informative": {"num_classes": 2, "names": ["Image Non Informative", "Image Informative"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Directed_Hate": {"num_classes": 2, "names": ["Directed Hate Absent", "Directed Hate Present"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Generalized_Hate": {"num_classes": 2, "names": ["Generalized Hate Absent", "Generalized Hate Present"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Sarcasm": {"num_classes": 2, "names": ["Sarcasm Absent", "Sarcasm Present"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Allegation": {"num_classes": 2, "names": ["Allegation Absent", "Allegation Present"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Justification": {"num_classes": 2, "names": ["Justification Absent", "Justification Present"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Refutation": {"num_classes": 2, "names": ["Refutation Absent", "Refutation Present"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Support": {"num_classes": 2, "names": ["Support Absent", "Support Present"], "names_file": null, "id": null, "_type": "ClassLabel"}, "Oppose": {"num_classes": 2, "names": ["Oppose Absent", "Oppose Present"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "metooma", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 821738, "num_examples": 7978, "dataset_name": "metooma"}, "test": {"name": "test", "num_bytes": 205489, "num_examples": 1995, "dataset_name": "metooma"}}, "download_checksums": {"https://raw.githubusercontent.com/akash418/public-data-repo/main/MeTooMMD_train.csv": {"num_bytes": 327096, "checksum": "59aa82e7b7d6d609ed1d4d21764271b2898538869edfeb7f18b6a35886389bd7"}, "https://raw.githubusercontent.com/akash418/public-data-repo/main/MeTooMMD_test.csv": {"num_bytes": 81793, "checksum": "3110815f1c579fe4318d929962487ceadbb68da63dff8ac92bbe997f9a6109df"}}, "download_size": 408889, "post_processing_size": null, "dataset_size": 1027227, "size_in_bytes": 1436116}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f28ebc36ea921ebb517c9641c1363a6cbdfe20cea17705a70fdf8c8e98a43642
3
+ size 550
metooma.py ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+ """TODO: Add a description here."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @inproceedings{gautam2020metooma,
26
+ title={# MeTooMA: Multi-Aspect Annotations of Tweets Related to the MeToo Movement},
27
+ author={Gautam, Akash and Mathur, Puneet and Gosangi, Rakesh and Mahata, Debanjan and Sawhney, Ramit and Shah, Rajiv Ratn},
28
+ booktitle={Proceedings of the International AAAI Conference on Web and Social Media},
29
+ volume={14},
30
+ pages={209--216},
31
+ year={2020} }
32
+ """
33
+
34
+ _DESCRIPTION = """\
35
+ The dataset consists of tweets belonging to #MeToo movement on Twitter, labelled into different categories.
36
+ Due to Twitter's development policies, we only provide the tweet ID's and corresponding labels,
37
+ other data can be fetched via Twitter API.
38
+ The data has been labelled by experts, with the majority taken into the account for deciding the final label.
39
+ We provide these labels for each of the tweets. The labels provided for each data point
40
+ includes -- Relevance, Directed Hate, Generalized Hate,
41
+ Sarcasm, Allegation, Justification, Refutation, Support, Oppose
42
+ """
43
+
44
+
45
+ _TRAIN_DOWNLOAD_URL = "https://raw.githubusercontent.com/akash418/public-data-repo/main/MeTooMMD_train.csv"
46
+ _TEST_DOWNLOAD_URL = "https://raw.githubusercontent.com/akash418/public-data-repo/main/MeTooMMD_test.csv"
47
+
48
+
49
+ class Metooma(datasets.GeneratorBasedBuilder):
50
+ """Metooma dataset -- Dataset providing labeled information for tweets belonging to the MeToo movement"""
51
+
52
+ VERSION = datasets.Version("1.1.0")
53
+
54
+ def _info(self):
55
+ # This method pecifies the datasets.DatasetInfo object which contains informations and typings for the dataset
56
+
57
+ return datasets.DatasetInfo(
58
+ # This is the description that will appear on the datasets page.
59
+ description=_DESCRIPTION,
60
+ features=datasets.Features(
61
+ {
62
+ "TweetId": datasets.Value("string"),
63
+ "Text_Only_Informative": datasets.ClassLabel(names=["Text Non Informative", "Text Informative"]),
64
+ "Image_Only_Informative": datasets.ClassLabel(
65
+ names=["Image Non Informative", "Image Informative"]
66
+ ),
67
+ "Directed_Hate": datasets.ClassLabel(names=["Directed Hate Absent", "Directed Hate Present"]),
68
+ "Generalized_Hate": datasets.ClassLabel(
69
+ names=["Generalized Hate Absent", "Generalized Hate Present"]
70
+ ),
71
+ "Sarcasm": datasets.ClassLabel(names=["Sarcasm Absent", "Sarcasm Present"]),
72
+ "Allegation": datasets.ClassLabel(names=["Allegation Absent", "Allegation Present"]),
73
+ "Justification": datasets.ClassLabel(names=["Justification Absent", "Justification Present"]),
74
+ "Refutation": datasets.ClassLabel(names=["Refutation Absent", "Refutation Present"]),
75
+ "Support": datasets.ClassLabel(names=["Support Absent", "Support Present"]),
76
+ "Oppose": datasets.ClassLabel(names=["Oppose Absent", "Oppose Present"]),
77
+ }
78
+ ),
79
+ supervised_keys=None,
80
+ # Homepage of the dataset for documentation
81
+ homepage="https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/JN4EYU",
82
+ citation=_CITATION,
83
+ )
84
+
85
+ def _split_generators(self, dl_manager):
86
+ """Returns SplitGenerators."""
87
+
88
+ train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
89
+ test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
90
+
91
+ return [
92
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
93
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
94
+ ]
95
+
96
+ def _generate_examples(self, filepath):
97
+ """ Yields examples. """
98
+ with open(filepath, encoding="utf-8") as csv_file:
99
+ csv_reader = csv.reader(
100
+ csv_file,
101
+ quotechar='"',
102
+ delimiter=",",
103
+ quoting=csv.QUOTE_ALL,
104
+ skipinitialspace=True,
105
+ )
106
+ for id_, row in enumerate(csv_reader):
107
+ (
108
+ tweet_id,
109
+ text_informative_label,
110
+ image_informative_label,
111
+ dir_hate_label,
112
+ gen_hate_label,
113
+ sarcasm_label,
114
+ allegtation_label,
115
+ justification_label,
116
+ refutation_label,
117
+ support_label,
118
+ oppose_label,
119
+ ) = row
120
+
121
+ yield id_, {
122
+ "TweetId": tweet_id,
123
+ "Text_Only_Informative": int(text_informative_label),
124
+ "Image_Only_Informative": int(image_informative_label),
125
+ "Directed_Hate": int(dir_hate_label),
126
+ "Generalized_Hate": int(gen_hate_label),
127
+ "Sarcasm": int(sarcasm_label),
128
+ "Allegation": int(allegtation_label),
129
+ "Justification": int(justification_label),
130
+ "Refutation": int(refutation_label),
131
+ "Support": int(support_label),
132
+ "Oppose": int(oppose_label),
133
+ }