Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
topic-classification
Languages:
Hausa
Size:
1K - 10K
License:
Commit
·
5e7d56d
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +139 -0
- dataset_infos.json +1 -0
- dummy/0.0.0/dummy_data.zip +3 -0
- hausa_voa_topics.py +90 -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,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- ha
|
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 Hausa VOA News Topic Classification dataset (hausa_voa_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 Hausa. The news headlines were collected from [VOA Hausa](https://www.voahausa.com/).
|
59 |
+
|
60 |
+
### Supported Tasks and Leaderboards
|
61 |
+
|
62 |
+
[More Information Needed]
|
63 |
+
|
64 |
+
### Languages
|
65 |
+
|
66 |
+
Hausa (ISO 639-1: ha)
|
67 |
+
|
68 |
+
## Dataset Structure
|
69 |
+
|
70 |
+
### Data Instances
|
71 |
+
|
72 |
+
An instance consists of a news title sentence and the corresponding topic label.
|
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: Nigeria, Africa, World, Health or Politics.
|
78 |
+
|
79 |
+
### Data Splits
|
80 |
+
|
81 |
+
[More Information Needed]
|
82 |
+
|
83 |
+
## Dataset Creation
|
84 |
+
|
85 |
+
### Curation Rationale
|
86 |
+
|
87 |
+
[More Information Needed]
|
88 |
+
|
89 |
+
### Source Data
|
90 |
+
|
91 |
+
#### Initial Data Collection and Normalization
|
92 |
+
|
93 |
+
[More Information Needed]
|
94 |
+
|
95 |
+
#### Who are the source language producers?
|
96 |
+
|
97 |
+
[More Information Needed]
|
98 |
+
|
99 |
+
### Annotations
|
100 |
+
|
101 |
+
#### Annotation process
|
102 |
+
|
103 |
+
[More Information Needed]
|
104 |
+
|
105 |
+
#### Who are the annotators?
|
106 |
+
|
107 |
+
[More Information Needed]
|
108 |
+
|
109 |
+
### Personal and Sensitive Information
|
110 |
+
|
111 |
+
[More Information Needed]
|
112 |
+
|
113 |
+
## Considerations for Using the Data
|
114 |
+
|
115 |
+
### Social Impact of Dataset
|
116 |
+
|
117 |
+
[More Information Needed]
|
118 |
+
|
119 |
+
### Discussion of Biases
|
120 |
+
|
121 |
+
[More Information Needed]
|
122 |
+
|
123 |
+
### Other Known Limitations
|
124 |
+
|
125 |
+
[More Information Needed]
|
126 |
+
|
127 |
+
## Additional Information
|
128 |
+
|
129 |
+
### Dataset Curators
|
130 |
+
|
131 |
+
[More Information Needed]
|
132 |
+
|
133 |
+
### Licensing Information
|
134 |
+
|
135 |
+
[More Information Needed]
|
136 |
+
|
137 |
+
### Citation Information
|
138 |
+
|
139 |
+
[More Information Needed]
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "A collection of news article headlines in Hausa from VOA Hausa. \nEach headline is labeled with one of the following classes: Nigeria, \nAfrica, World, Health or Politics.\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": 5, "names": ["Africa", "Health", "Nigeria", "Politics", "World"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "hausa_voa_topics", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 144932, "num_examples": 2045, "dataset_name": "hausa_voa_topics"}, "validation": {"name": "validation", "num_bytes": 20565, "num_examples": 290, "dataset_name": "hausa_voa_topics"}, "test": {"name": "test", "num_bytes": 41195, "num_examples": 582, "dataset_name": "hausa_voa_topics"}}, "download_checksums": {"https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/hausa_newsclass/train_clean.tsv": {"num_bytes": 137306, "checksum": "662bf8849d34f4163032afede21c2f2d103a956a6d6d6925b7a8b2577f8e5c62"}, "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/hausa_newsclass/dev.tsv": {"num_bytes": 19501, "checksum": "ca5629d297dec8c6f7878180ba2aa0a5852bafb57acc6b3ea4dc43cf600446e7"}, "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/hausa_newsclass/test.tsv": {"num_bytes": 39017, "checksum": "a174e3071e4d1e4713fb73aa93de583909d3bf5231abd0d09ab6ae4087a8f79b"}}, "download_size": 195824, "post_processing_size": null, "dataset_size": 206692, "size_in_bytes": 402516}}
|
dummy/0.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9f8c34d131f8b7088da78f3c339a59102a875af638b59e65f66e158a218fbb24
|
3 |
+
size 1090
|
hausa_voa_topics.py
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"""Hausa VOA 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 Hausa from VOA Hausa.
|
28 |
+
Each headline is labeled with one of the following classes: Nigeria,
|
29 |
+
Africa, World, Health or Politics.
|
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/hausa_newsclass/train_clean.tsv"
|
55 |
+
_VALIDATION_DOWNLOAD_URL = "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/hausa_newsclass/dev.tsv"
|
56 |
+
_TEST_DOWNLOAD_URL = "https://raw.githubusercontent.com/uds-lsv/transfer-distant-transformer-african/master/data/hausa_newsclass/test.tsv"
|
57 |
+
|
58 |
+
|
59 |
+
class HausaVOATopics(datasets.GeneratorBasedBuilder):
|
60 |
+
"""Hausa VOA News 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(names=["Africa", "Health", "Nigeria", "Politics", "World"]),
|
69 |
+
}
|
70 |
+
),
|
71 |
+
homepage="https://github.com/uds-lsv/transfer-distant-transformer-african",
|
72 |
+
citation=_CITATION,
|
73 |
+
)
|
74 |
+
|
75 |
+
def _split_generators(self, dl_manager):
|
76 |
+
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
77 |
+
validation_path = dl_manager.download_and_extract(_VALIDATION_DOWNLOAD_URL)
|
78 |
+
test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
|
79 |
+
return [
|
80 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
|
81 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": validation_path}),
|
82 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
|
83 |
+
]
|
84 |
+
|
85 |
+
def _generate_examples(self, filepath):
|
86 |
+
"""Generate Hausa VOA News Topic examples."""
|
87 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
88 |
+
csv_reader = csv.DictReader(csv_file, delimiter="\t")
|
89 |
+
for id_, row in enumerate(csv_reader):
|
90 |
+
yield id_, {"news_title": row["news_title"], "label": row["label"]}
|