system HF staff commited on
Commit
2d6e6a6
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

.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,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - en
8
+ - es
9
+ - fr
10
+ - ht
11
+ - ur
12
+ licenses:
13
+ - unknown
14
+ multilinguality:
15
+ - multilingual
16
+ size_categories:
17
+ - 10K<n<100K
18
+ source_datasets:
19
+ - original
20
+ task_categories:
21
+ - conditional-text-generation
22
+ - text-classification
23
+ task_ids:
24
+ - intent-classification
25
+ - sentiment-classification
26
+ - text-simplification
27
+ ---
28
+
29
+ # Dataset Card for Disaster Response Messages
30
+
31
+ ## Table of Contents
32
+ - [Dataset Description](#dataset-description)
33
+ - [Dataset Summary](#dataset-summary)
34
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
35
+ - [Languages](#languages)
36
+ - [Dataset Structure](#dataset-structure)
37
+ - [Data Instances](#data-instances)
38
+ - [Data Fields](#data-instances)
39
+ - [Data Splits](#data-instances)
40
+ - [Dataset Creation](#dataset-creation)
41
+ - [Curation Rationale](#curation-rationale)
42
+ - [Source Data](#source-data)
43
+ - [Annotations](#annotations)
44
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
45
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
46
+ - [Social Impact of Dataset](#social-impact-of-dataset)
47
+ - [Discussion of Biases](#discussion-of-biases)
48
+ - [Other Known Limitations](#other-known-limitations)
49
+ - [Additional Information](#additional-information)
50
+ - [Dataset Curators](#dataset-curators)
51
+ - [Licensing Information](#licensing-information)
52
+ - [Citation Information](#citation-information)
53
+
54
+ ## Dataset Description
55
+
56
+ - **Homepage: [HomePage](https://appen.com/datasets/combined-disaster-response-data/)
57
+ - **Repository: [Repo to Download the Dataset](https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_training.csv)
58
+ - **Paper:
59
+ - **Leaderboard:
60
+ - **Point of Contact:[Darshan Gandhi](darshangandhi1151@gmail.com)
61
+
62
+ ### Dataset Summary
63
+
64
+ This dataset contains 30,000 messages drawn from events including an earthquake in Haiti in 2010, an earthquake in Chile in 2010, floods in Pakistan in 2010, super-storm Sandy in the U.S.A. in 2012, and news articles spanning a large number of years and 100s of different disasters. The data has been encoded with 36 different categories related to disaster response and has been stripped of messages with sensitive information in their entirety. Upon release, this is the featured dataset of a new Udacity course on Data Science and the AI4ALL summer school and is especially utile for text analytics and natural language processing (NLP) tasks and models.The input data in this job contains thousands of untranslated disaster-related messages and their English translations. In the “Data” tab above, you’ll find the annotated data, with 40 class labels for intent and content.
65
+
66
+ ### Supported Tasks and Leaderboards
67
+
68
+ The input data in this job contains thousands of untranslated disaster-related messages and their English translations. In the dataset, you’ll find the annotated data, with 40 class labels for intent and content. This dataset contains the original message in its original language, the English translation, and dozens of classes for message content. These classes are noted in column titles with a simple binary 1= yes, 0=no.
69
+
70
+ ### Languages
71
+
72
+ The dataset is a multilingual dataset which has the messages in the original language and also it's translated English form.
73
+
74
+ ## Dataset Structure
75
+
76
+ ### Data Instances
77
+
78
+ The dataset consists of a message in English and also it's original language form. Adding on, there are 40 labels which help to understand more about the exact essence of the message.
79
+
80
+ Example of a Disaster Response : { 'split': 'train', 'message': 'Weather update - a cold front from Cuba that could pass over Haiti', 'original': 'Un front froid se retrouve sur Cuba ce matin. Il pourrait traverser Haiti demain. Des averses de pluie isolee sont encore prevues sur notre region ce soi', 'genre': 'direct', 'related': 1, 'PII': 0, 'request': 0, 'offer': 0, 'aid_related': 0, 'medical_help': 0, 'medical_products': 0, 'search_and_rescue': 0, 'security': 0, 'military': 0, 'child_alone': 0, 'water': 0, 'food': 0, 'shelter': 0, 'clothing': 0, 'money': 0, 'missing_people': 0, 'refugees': 0, 'death': 0, 'other_aid': 0, 'infrastructure_related': 0, 'transport': 0, 'buildings': 0, 'electricity': 0, 'tools': 0, 'hospitals': 0, 'shops': 0, 'aid_centers': 0, 'other_infrastructure': 0, 'weather_related': 0, 'floods': 0, 'storm': 0, 'fire': 0, 'earthquake': 0, 'cold': 0, 'other_weather': 0, 'direct_report': 0}
81
+
82
+ ### Data Fields
83
+
84
+ *split: Train, Test split</br>
85
+ *message: English text of actual messages related to disaster </br>
86
+ *original: Text of column 3 in native language as originally written</br>
87
+ *genre: Type of message, including direct messages, social posting, and news stories or bulletins</br>
88
+ *related: Is the message disaster related? 1= yes, 0=no, 2=maybe</br>
89
+ *PII: Does the message contain PII? 1= yes, 0=no </br>
90
+ *request: Does the message contain a request? 1= yes, 0=no </br>
91
+ *offer: Does the message contain an offer? 1= yes, 0=no </br>
92
+ *aid_related: Is the message aid related? 1= yes, 0=no </br>
93
+ *medical_help: Does the message concern medical help? 1= yes, 0=no </br>
94
+ *medical_products: Does the message concern medical products? 1= yes, 0=no </br>
95
+ *search_and_rescue: Does the message concern search and rescue? 1= yes, 0=no </br>
96
+ *security: Does the message concern security? 1= yes, 0=no </br>
97
+ *military: Does the message concern military? 1= yes, 0=no </br>
98
+ *child_alone: Does the message mention a child alone? 1= yes, 0=no</br>
99
+ *water: Does the message concern water? 1= yes, 0=no</br>
100
+ *food: Does the message concern food? 1= yes, 0=no </br>
101
+ *shelter: Does the message concern shelter? 1= yes, 0=no </br>
102
+ *clothing: Does the message concern clothing? 1= yes, 0=no </br>
103
+ *money: Does the message concern money? 1= yes, 0=no </br>
104
+ *missing_people: Does the message indicate missing people? 1= yes, 0=no</br>
105
+ *refugees: Does the message concern refugess? 1= yes, 0=no</br>
106
+ *death: Does the message imply death? 1= yes, 0=no </br>
107
+ *other_aid: Is there any other aid needed? 1=yes, 0=no </br>
108
+ *infrastructure_related: Does the message concern infrastructure? 1= yes, 0=no </br>
109
+ *transport: Does the message concern transport? 1= yes, 0=no </br>
110
+ *buildings: Does the message concern buildings? 1= yes, 0=no </br>
111
+ *electricity: Does the message concern electricity? 1= yes, 0=no </br>
112
+ *tools: Does the message concern tools? 1= yes, 0=no </br>
113
+ *hospitals: Does the message concern clothing? 1= yes, 0=no </br>
114
+ *shops: Does the message concern clothing? 1= yes, 0=no </br>
115
+ *aid_centers:Does the message concern clothing? 1= yes, 0=no </br>
116
+ *other_infrastructure:Does the message concern clothing? 1= yes, 0=no </br>
117
+ *weather_related: Does the message concern weather? 1= yes, 0=no</br>
118
+ *floods: Does the message indicate there was a flood? 1= yes, 0=no</br>
119
+ *storm: Does the message indicate there was a storm? 1= yes, 0=no </br>
120
+ *fire: Does the message indicate there was a fire? 1= yes, 0=no</br>
121
+ *earthquake: Does the message indicate there was an earthquake? 1= yes, 0=no</br>
122
+ *cold: Does the message indicate there was a cold? 1= yes, 0=no</br>
123
+ *other_weather: Does the message indicate there was other weather issues? 1= yes, 0=no</br>
124
+ *direct_report: Does the show a direct report? 1= yes, 0=no
125
+
126
+ ### Data Splits
127
+
128
+ The data is split into train, test :
129
+
130
+ Train Count : 21046 Test Count : 2629
131
+
132
+ ## Dataset Creation
133
+
134
+ ### Curation Rationale
135
+
136
+ The dataset was built to understand about the sentiments of the citizens and also more about want was the emergency about and what kind of help they were seeking
137
+
138
+ ### Source Data
139
+
140
+ #### Initial Data Collection and Normalization
141
+
142
+ [More Information Needed]
143
+
144
+ #### Who are the source language producers?
145
+
146
+ [More Information Needed]
147
+
148
+ ### Annotations
149
+
150
+ #### Annotation process
151
+
152
+ [More Information Needed]
153
+
154
+ #### Who are the annotators?
155
+
156
+ [More Information Needed]
157
+
158
+ ### Personal and Sensitive Information
159
+
160
+ [More Information Needed]
161
+
162
+ ## Considerations for Using the Data
163
+
164
+ ### Social Impact of Dataset
165
+
166
+ The dataset has a great usecase of understand more about the sentiments of the citizens around the globe during a disaster and how their responses are. Also, it helps the government to understand their citizens better and would eventually help to draft better policies accordingly.
167
+
168
+ ### Discussion of Biases
169
+
170
+ The messages since have been translated in English may not be able to judically imply the exact significance of the individual when they would have posted the message
171
+
172
+ ### Other Known Limitations
173
+
174
+ [More Information Needed]
175
+
176
+ ## Additional Information
177
+
178
+ ### Dataset Curators
179
+
180
+ The dataset was initially created by [Appen](https://appen.com/)
181
+
182
+ ### Licensing Information
183
+
184
+ [More Information Needed]
185
+
186
+ ### Citation Information
187
+
188
+ [Multilingual Disaster Response Messages](https://appen.com/datasets/combined-disaster-response-data/)
189
+
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "This dataset contains 30,000 messages drawn from events including an earthquake in Haiti in 2010, an earthquake in Chile in 2010, floods in Pakistan in 2010, super-storm Sandy in the U.S.A. in 2012, and news articles spanning a large number of years and 100s of different disasters.\nThe data has been encoded with 36 different categories related to disaster response and has been stripped of messages with sensitive information in their entirety.\nUpon release, this is the featured dataset of a new Udacity course on Data Science and the AI4ALL summer school and is especially utile for text analytics and natural language processing (NLP) tasks and models.\nThe input data in this job contains thousands of untranslated disaster-related messages and their English translations.\n", "citation": "@inproceedings{title={Multilingual Disaster Response Messages}\n}\n", "homepage": "https://appen.com/datasets/combined-disaster-response-data/", "license": "", "features": {"split": {"dtype": "string", "id": null, "_type": "Value"}, "message": {"dtype": "string", "id": null, "_type": "Value"}, "original": {"dtype": "string", "id": null, "_type": "Value"}, "genre": {"dtype": "string", "id": null, "_type": "Value"}, "related": {"num_classes": 3, "names": ["false", "true", "maybe"], "names_file": null, "id": null, "_type": "ClassLabel"}, "PII": {"dtype": "int8", "id": null, "_type": "Value"}, "request": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "offer": {"dtype": "int8", "id": null, "_type": "Value"}, "aid_related": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "medical_help": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "medical_products": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "search_and_rescue": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "security": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "military": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "child_alone": {"dtype": "int8", "id": null, "_type": "Value"}, "water": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "food": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "shelter": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "clothing": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "money": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "missing_people": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "refugees": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "death": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "other_aid": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "infrastructure_related": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "transport": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "buildings": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "electricity": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "tools": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "hospitals": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "shops": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "aid_centers": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "other_infrastructure": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "weather_related": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "floods": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "storm": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "fire": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "earthquake": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "cold": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "other_weather": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "direct_report": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "disaster_response_messages", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 10060799, "num_examples": 21046, "dataset_name": "disaster_response_messages"}, "test": {"name": "test", "num_bytes": 1253810, "num_examples": 2629, "dataset_name": "disaster_response_messages"}}, "download_checksums": {"https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_training.csv": {"num_bytes": 5746561, "checksum": "7ca5e54492d0002cf648fa7ae62096ff3ed3318d0f4da32c8d579237b824634c"}, "https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_test.csv": {"num_bytes": 715427, "checksum": "f8fe5bf1c8bf3773487d19b6d702a1635cb7b60b1827923093fe2005f0274ef8"}}, "download_size": 6461988, "post_processing_size": null, "dataset_size": 11314609, "size_in_bytes": 17776597}}
disaster_response_messages.py ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
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
+ # Lint as: python3
17
+ """Multilingual Disaster Response Messages dataset."""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import csv
22
+
23
+ import datasets
24
+
25
+
26
+ _DESCRIPTION = """\
27
+ This dataset contains 30,000 messages drawn from events including an earthquake in Haiti in 2010, an earthquake in Chile in 2010, floods in Pakistan in 2010, super-storm Sandy in the U.S.A. in 2012, and news articles spanning a large number of years and 100s of different disasters.
28
+ The data has been encoded with 36 different categories related to disaster response and has been stripped of messages with sensitive information in their entirety.
29
+ Upon release, this is the featured dataset of a new Udacity course on Data Science and the AI4ALL summer school and is especially utile for text analytics and natural language processing (NLP) tasks and models.
30
+ The input data in this job contains thousands of untranslated disaster-related messages and their English translations.
31
+ """
32
+
33
+ _CITATION = """\
34
+ @inproceedings{title={Multilingual Disaster Response Messages}
35
+ }
36
+ """
37
+
38
+ _TRAIN_DOWNLOAD_URL = (
39
+ "https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_training.csv"
40
+ )
41
+ _TEST_DOWNLOAD_URL = (
42
+ "https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_test.csv"
43
+ )
44
+
45
+
46
+ class DisasterResponseMessages(datasets.GeneratorBasedBuilder):
47
+ """Multilingual Disaster Response Messages dataset."""
48
+
49
+ def _info(self):
50
+ return datasets.DatasetInfo(
51
+ description=_DESCRIPTION,
52
+ features=datasets.Features(
53
+ {
54
+ "split": datasets.Value("string"),
55
+ "message": datasets.Value("string"),
56
+ "original": datasets.Value("string"),
57
+ "genre": datasets.Value("string"),
58
+ "related": datasets.ClassLabel(names=["false", "true", "maybe"]),
59
+ "PII": datasets.Value("int8"),
60
+ "request": datasets.ClassLabel(names=["false", "true"]),
61
+ "offer": datasets.Value("int8"),
62
+ "aid_related": datasets.ClassLabel(names=["false", "true"]),
63
+ "medical_help": datasets.ClassLabel(names=["false", "true"]),
64
+ "medical_products": datasets.ClassLabel(names=["false", "true"]),
65
+ "search_and_rescue": datasets.ClassLabel(names=["false", "true"]),
66
+ "security": datasets.ClassLabel(names=["false", "true"]),
67
+ "military": datasets.ClassLabel(names=["false", "true"]),
68
+ "child_alone": datasets.Value("int8"),
69
+ "water": datasets.ClassLabel(names=["false", "true"]),
70
+ "food": datasets.ClassLabel(names=["false", "true"]),
71
+ "shelter": datasets.ClassLabel(names=["false", "true"]),
72
+ "clothing": datasets.ClassLabel(names=["false", "true"]),
73
+ "money": datasets.ClassLabel(names=["false", "true"]),
74
+ "missing_people": datasets.ClassLabel(names=["false", "true"]),
75
+ "refugees": datasets.ClassLabel(names=["false", "true"]),
76
+ "death": datasets.ClassLabel(names=["false", "true"]),
77
+ "other_aid": datasets.ClassLabel(names=["false", "true"]),
78
+ "infrastructure_related": datasets.ClassLabel(names=["false", "true"]),
79
+ "transport": datasets.ClassLabel(names=["false", "true"]),
80
+ "buildings": datasets.ClassLabel(names=["false", "true"]),
81
+ "electricity": datasets.ClassLabel(names=["false", "true"]),
82
+ "tools": datasets.ClassLabel(names=["false", "true"]),
83
+ "hospitals": datasets.ClassLabel(names=["false", "true"]),
84
+ "shops": datasets.ClassLabel(names=["false", "true"]),
85
+ "aid_centers": datasets.ClassLabel(names=["false", "true"]),
86
+ "other_infrastructure": datasets.ClassLabel(names=["false", "true"]),
87
+ "weather_related": datasets.ClassLabel(names=["false", "true"]),
88
+ "floods": datasets.ClassLabel(names=["false", "true"]),
89
+ "storm": datasets.ClassLabel(names=["false", "true"]),
90
+ "fire": datasets.ClassLabel(names=["false", "true"]),
91
+ "earthquake": datasets.ClassLabel(names=["false", "true"]),
92
+ "cold": datasets.ClassLabel(names=["false", "true"]),
93
+ "other_weather": datasets.ClassLabel(names=["false", "true"]),
94
+ "direct_report": datasets.ClassLabel(names=["false", "true"]),
95
+ }
96
+ ),
97
+ homepage="https://appen.com/datasets/combined-disaster-response-data/",
98
+ citation=_CITATION,
99
+ )
100
+
101
+ def _split_generators(self, dl_manager):
102
+ train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
103
+ test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
104
+ return [
105
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
106
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
107
+ ]
108
+
109
+ def _generate_examples(self, filepath):
110
+ """Generate Distaster Response Messages examples."""
111
+ with open(filepath, encoding="utf-8") as csv_file:
112
+ csv_reader = csv.reader(
113
+ csv_file, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True
114
+ )
115
+ next(csv_reader, None)
116
+ for id_, row in enumerate(csv_reader):
117
+ row = row[1:]
118
+ (
119
+ split,
120
+ message,
121
+ original,
122
+ genre,
123
+ related,
124
+ PII,
125
+ request,
126
+ offer,
127
+ aid_related,
128
+ medical_help,
129
+ medical_products,
130
+ search_and_rescue,
131
+ security,
132
+ military,
133
+ child_alone,
134
+ water,
135
+ food,
136
+ shelter,
137
+ clothing,
138
+ money,
139
+ missing_people,
140
+ refugees,
141
+ death,
142
+ other_aid,
143
+ infrastructure_related,
144
+ transport,
145
+ buildings,
146
+ electricity,
147
+ tools,
148
+ hospitals,
149
+ shops,
150
+ aid_centers,
151
+ other_infrastructure,
152
+ weather_related,
153
+ floods,
154
+ storm,
155
+ fire,
156
+ earthquake,
157
+ cold,
158
+ other_weather,
159
+ direct_report,
160
+ ) = row
161
+
162
+ yield id_, {
163
+ "split": (split),
164
+ "message": (message),
165
+ "original": (original),
166
+ "genre": (genre),
167
+ "related": int(related),
168
+ "PII": int(PII),
169
+ "request": int(request),
170
+ "offer": int(offer),
171
+ "aid_related": int(aid_related),
172
+ "medical_help": int(medical_help),
173
+ "medical_products": int(medical_products),
174
+ "search_and_rescue": int(search_and_rescue),
175
+ "security": int(security),
176
+ "military": int(military),
177
+ "child_alone": int(child_alone),
178
+ "water": int(water),
179
+ "food": int(food),
180
+ "shelter": int(shelter),
181
+ "clothing": int(clothing),
182
+ "money": int(money),
183
+ "missing_people": int(missing_people),
184
+ "refugees": int(refugees),
185
+ "death": int(death),
186
+ "other_aid": int(other_aid),
187
+ "infrastructure_related": int(infrastructure_related),
188
+ "transport": int(transport),
189
+ "buildings": int(buildings),
190
+ "electricity": int(electricity),
191
+ "tools": int(tools),
192
+ "hospitals": int(hospitals),
193
+ "shops": int(shops),
194
+ "aid_centers": int(aid_centers),
195
+ "other_infrastructure": int(other_infrastructure),
196
+ "weather_related": int(weather_related),
197
+ "floods": int(floods),
198
+ "storm": int(storm),
199
+ "fire": int(fire),
200
+ "earthquake": int(earthquake),
201
+ "cold": int(cold),
202
+ "other_weather": int(other_weather),
203
+ "direct_report": int(direct_report),
204
+ }
dummy/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7738d404cd9b52551e70b8540fdae76869590ad96621652afbf4b24b0d37f2c4
3
+ size 1694