system HF staff commited on
Commit
7492ae1
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,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - yo
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - topic-classification
20
+ ---
21
+
22
+ # Dataset Card for Yoruba BBC News Topic Classification dataset (yoruba_bbc_topics)
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:** -
50
+ - **Repository:** https://github.com/uds-lsv/transfer-distant-transformer-african
51
+ - **Paper:** https://www.aclweb.org/anthology/2020.emnlp-main.204/
52
+ - **Leaderboard:** -
53
+ - **Point of Contact:** Michael A. Hedderich and David Adelani
54
+ {mhedderich, didelani} (at) lsv.uni-saarland.de
55
+
56
+ ### Dataset Summary
57
+
58
+ A news headline topic classification dataset, similar to AG-news, for Yorùbá. The news headlines were collected from [BBC Yoruba](https://www.bbc.com/yoruba).
59
+
60
+ ### Supported Tasks and Leaderboards
61
+
62
+ [More Information Needed]
63
+
64
+ ### Languages
65
+
66
+ Yorùbá (ISO 639-1: yo)
67
+
68
+ ## Dataset Structure
69
+
70
+ ### Data Instances
71
+
72
+ An instance consists of a news title sentence and the corresponding topic label as well as publishing information (date and website id).
73
+
74
+ ### Data Fields
75
+
76
+ - `news_title`: A news title.
77
+ - `label`: The label describing the topic of the news title. Can be one of the following classes: africa, entertainment, health, nigeria, politics, sport or world.
78
+ - `date`: The publication date (in Yorùbá).
79
+ - `bbc_url_id`: The identifier of the article in the BBC URL.
80
+
81
+ ### Data Splits
82
+
83
+ [More Information Needed]
84
+
85
+ ## Dataset Creation
86
+
87
+ ### Curation Rationale
88
+
89
+ [More Information Needed]
90
+
91
+ ### Source Data
92
+
93
+ #### Initial Data Collection and Normalization
94
+
95
+ [More Information Needed]
96
+
97
+ #### Who are the source language producers?
98
+
99
+ [More Information Needed]
100
+
101
+ ### Annotations
102
+
103
+ #### Annotation process
104
+
105
+ [More Information Needed]
106
+
107
+ #### Who are the annotators?
108
+
109
+ [More Information Needed]
110
+
111
+ ### Personal and Sensitive Information
112
+
113
+ [More Information Needed]
114
+
115
+ ## Considerations for Using the Data
116
+
117
+ ### Social Impact of Dataset
118
+
119
+ [More Information Needed]
120
+
121
+ ### Discussion of Biases
122
+
123
+ [More Information Needed]
124
+
125
+ ### Other Known Limitations
126
+
127
+ [More Information Needed]
128
+
129
+ ## Additional Information
130
+
131
+ ### Dataset Curators
132
+
133
+ [More Information Needed]
134
+
135
+ ### Licensing Information
136
+
137
+ [More Information Needed]
138
+
139
+ ### Citation Information
140
+
141
+ [More Information Needed]
142
+
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "A collection of news article headlines in Yoruba from BBC Yoruba.\nEach headline is labeled with one of the following classes: africa,\nentertainment, health, nigeria, politics, sport or world.\n\nThe dataset was presented in the paper:\nHedderich, Adelani, Zhu, Alabi, Markus, Klakow: Transfer Learning and\nDistant Supervision for Multilingual Transformer Models: A Study on\nAfrican Languages (EMNLP 2020).\n", "citation": "@inproceedings{hedderich-etal-2020-transfer,\n title = \"Transfer Learning and Distant Supervision for Multilingual Transformer Models: A Study on African Languages\",\n author = \"Hedderich, Michael A. and\n Adelani, David and\n Zhu, Dawei and\n Alabi, Jesujoba and\n Markus, Udia and\n Klakow, Dietrich\",\n booktitle = \"Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)\",\n year = \"2020\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/2020.emnlp-main.204\",\n doi = \"10.18653/v1/2020.emnlp-main.204\",\n}\n", "homepage": "https://github.com/uds-lsv/transfer-distant-transformer-african", "license": "", "features": {"news_title": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 7, "names": ["africa", "entertainment", "health", "nigeria", "politics", "sport", "world"], "names_file": null, "id": null, "_type": "ClassLabel"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "bbc_url_id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "yoruba_bbc_topics", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 197117, "num_examples": 1340, "dataset_name": "yoruba_bbc_topics"}, "validation": {"name": "validation", "num_bytes": 27771, "num_examples": 189, "dataset_name": "yoruba_bbc_topics"}, "test": {"name": "test", "num_bytes": 55652, "num_examples": 379, "dataset_name": "yoruba_bbc_topics"}}, "download_checksums": {"https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/yoruba_newsclass/train_clean.tsv": {"num_bytes": 186519, "checksum": "6ea72acbd8bd7712e2ce566642ed67410e92166209c86c984f8fc6700e3a2aee"}, "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/yoruba_newsclass/dev.tsv": {"num_bytes": 26293, "checksum": "2d4fe2cd7a0845b52d3e0ee2b6f272b0918df477d64aa301b7adca03cbb20a8d"}, "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/yoruba_newsclass/test.tsv": {"num_bytes": 52668, "checksum": "9934b609f76d850d2468fcb9e0421dcb9a33f59a78cea33bc67e5510dc034e0f"}}, "download_size": 265480, "post_processing_size": null, "dataset_size": 280540, "size_in_bytes": 546020}}
dummy/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc02045003fbaef970aff5f9098a5f7ac1246aef9d157b0d96a48b4fa80e0f27
3
+ size 1658
yoruba_bbc_topics.py ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Yoruba BBC News Topic Classification dataset."""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import csv
22
+
23
+ import datasets
24
+
25
+
26
+ _DESCRIPTION = """\
27
+ A collection of news article headlines in Yoruba from BBC Yoruba.
28
+ Each headline is labeled with one of the following classes: africa,
29
+ entertainment, health, nigeria, politics, sport or world.
30
+
31
+ The dataset was presented in the paper:
32
+ Hedderich, Adelani, Zhu, Alabi, Markus, Klakow: Transfer Learning and
33
+ Distant Supervision for Multilingual Transformer Models: A Study on
34
+ African Languages (EMNLP 2020).
35
+ """
36
+
37
+ _CITATION = """\
38
+ @inproceedings{hedderich-etal-2020-transfer,
39
+ title = "Transfer Learning and Distant Supervision for Multilingual Transformer Models: A Study on African Languages",
40
+ author = "Hedderich, Michael A. and
41
+ Adelani, David and
42
+ Zhu, Dawei and
43
+ Alabi, Jesujoba and
44
+ Markus, Udia and
45
+ Klakow, Dietrich",
46
+ booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
47
+ year = "2020",
48
+ publisher = "Association for Computational Linguistics",
49
+ url = "https://www.aclweb.org/anthology/2020.emnlp-main.204",
50
+ doi = "10.18653/v1/2020.emnlp-main.204",
51
+ }
52
+ """
53
+
54
+ _TRAIN_DOWNLOAD_URL = "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/yoruba_newsclass/train_clean.tsv"
55
+ _VALIDATION_DOWNLOAD_URL = "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/yoruba_newsclass/dev.tsv"
56
+ _TEST_DOWNLOAD_URL = "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/yoruba_newsclass/test.tsv"
57
+
58
+
59
+ class YorubaBBCTopics(datasets.GeneratorBasedBuilder):
60
+ """Yoruba BBC Topic Classification dataset."""
61
+
62
+ def _info(self):
63
+ return datasets.DatasetInfo(
64
+ description=_DESCRIPTION,
65
+ features=datasets.Features(
66
+ {
67
+ "news_title": datasets.Value("string"),
68
+ "label": datasets.features.ClassLabel(
69
+ names=["africa", "entertainment", "health", "nigeria", "politics", "sport", "world"]
70
+ ),
71
+ "date": datasets.Value("string"),
72
+ "bbc_url_id": datasets.Value("string"),
73
+ }
74
+ ),
75
+ homepage="https://github.com/uds-lsv/transfer-distant-transformer-african",
76
+ citation=_CITATION,
77
+ )
78
+
79
+ def _split_generators(self, dl_manager):
80
+ train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
81
+ validation_path = dl_manager.download_and_extract(_VALIDATION_DOWNLOAD_URL)
82
+ test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
83
+ return [
84
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
85
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": validation_path}),
86
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
87
+ ]
88
+
89
+ def _generate_examples(self, filepath):
90
+ """Generate Yoruba BBC News Topic examples."""
91
+ with open(filepath, encoding="utf-8") as csv_file:
92
+ csv_reader = csv.DictReader(csv_file, delimiter="\t")
93
+ for id_, row in enumerate(csv_reader):
94
+ yield id_, {
95
+ "news_title": row["news_title"],
96
+ "label": row["label"],
97
+ "date": row["date"],
98
+ "bbc_url_id": row["bbc_url_id"],
99
+ }