Commit
·
668d32e
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 +195 -0
- dataset_infos.json +1 -0
- dummy/bbc-igbo/1.1.0/dummy_data.zip +3 -0
- dummy/eze_goes_to_school/1.1.0/dummy_data.zip +3 -0
- dummy/igbo-radio/1.1.0/dummy_data.zip +3 -0
- dummy/jw-books/1.1.0/dummy_data.zip +3 -0
- dummy/jw-nt-igbo/1.1.0/dummy_data.zip +3 -0
- dummy/jw-ot-igbo/1.1.0/dummy_data.zip +3 -0
- dummy/jw-teta/1.1.0/dummy_data.zip +3 -0
- dummy/jw-ulo_nche/1.1.0/dummy_data.zip +3 -0
- dummy/jw-ulo_nche_naamu/1.1.0/dummy_data.zip +3 -0
- igbo_monolingual.py +367 -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,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- found
|
| 4 |
+
language_creators:
|
| 5 |
+
- found
|
| 6 |
+
languages:
|
| 7 |
+
- ig
|
| 8 |
+
licenses:
|
| 9 |
+
- unknown
|
| 10 |
+
multilinguality:
|
| 11 |
+
- monolingual
|
| 12 |
+
size_categories:
|
| 13 |
+
bbc-igbo:
|
| 14 |
+
- 1K<n<10K
|
| 15 |
+
eze_goes_to_school:
|
| 16 |
+
- n<1K
|
| 17 |
+
igbo-radio:
|
| 18 |
+
- n<1K
|
| 19 |
+
jw-books:
|
| 20 |
+
- n<1K
|
| 21 |
+
jw-nt-igbo:
|
| 22 |
+
- n<1K
|
| 23 |
+
jw-ot-igbo:
|
| 24 |
+
- n<1K
|
| 25 |
+
jw-teta:
|
| 26 |
+
- n<1K
|
| 27 |
+
jw-ulo_nche:
|
| 28 |
+
- n<1K
|
| 29 |
+
jw-ulo_nche_naamu:
|
| 30 |
+
- n<1K
|
| 31 |
+
source_datasets:
|
| 32 |
+
- original
|
| 33 |
+
task_categories:
|
| 34 |
+
- sequence-modeling
|
| 35 |
+
task_ids:
|
| 36 |
+
- language-modeling
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
# Dataset Card for Igbo Monolingual Dataset
|
| 40 |
+
|
| 41 |
+
## Table of Contents
|
| 42 |
+
- [Dataset Description](#dataset-description)
|
| 43 |
+
- [Dataset Summary](#dataset-summary)
|
| 44 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
| 45 |
+
- [Languages](#languages)
|
| 46 |
+
- [Dataset Structure](#dataset-structure)
|
| 47 |
+
- [Data Instances](#data-instances)
|
| 48 |
+
- [Data Fields](#data-fields)
|
| 49 |
+
- [Data Splits](#data-splits)
|
| 50 |
+
- [Dataset Creation](#dataset-creation)
|
| 51 |
+
- [Curation Rationale](#curation-rationale)
|
| 52 |
+
- [Source Data](#source-data)
|
| 53 |
+
- [Annotations](#annotations)
|
| 54 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
| 55 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
| 56 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
| 57 |
+
- [Discussion of Biases](#discussion-of-biases)
|
| 58 |
+
- [Other Known Limitations](#other-known-limitations)
|
| 59 |
+
- [Additional Information](#additional-information)
|
| 60 |
+
- [Dataset Curators](#dataset-curators)
|
| 61 |
+
- [Licensing Information](#licensing-information)
|
| 62 |
+
- [Citation Information](#citation-information)
|
| 63 |
+
|
| 64 |
+
## Dataset Description
|
| 65 |
+
|
| 66 |
+
- **Homepage:** https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling
|
| 67 |
+
- **Repository:** https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling
|
| 68 |
+
- **Paper:** https://arxiv.org/abs/2004.00648
|
| 69 |
+
|
| 70 |
+
### Dataset Summary
|
| 71 |
+
|
| 72 |
+
A dataset is a collection of Monolingual Igbo sentences.
|
| 73 |
+
|
| 74 |
+
### Supported Tasks and Leaderboards
|
| 75 |
+
|
| 76 |
+
[More Information Needed]
|
| 77 |
+
|
| 78 |
+
### Languages
|
| 79 |
+
|
| 80 |
+
Igbo (ig)
|
| 81 |
+
|
| 82 |
+
## Dataset Structure
|
| 83 |
+
|
| 84 |
+
### Data Instances
|
| 85 |
+
|
| 86 |
+
Here is an example from the bb-igbo config:
|
| 87 |
+
```
|
| 88 |
+
{'content': 'Ike Ekweremmadụ\n\nIke ịda jụụ otụ nkeji banyere oke ogbugbu na-eme n\'ala Naijiria agwụla Ekweremmadụ\n\nOsote onye-isi ndị ome-iwu Naịjirịa bụ Ike Ekweremadu ekwuola na ike agwụla ndị Sịnatị iji otu nkeji darajụụ akwanyere ndị egburu n\'ime oke ọgbaghara dị na Naịjirịa oge ọ bula.\n\nEkweremadu katọrọ mwakpọ na ogbugbu ndị Naịjirịa aka ha dị ọcha nke ndị Fulani na-achị ehi mere, kwuo na ike agwụla ndị ome- iwu ịkwanyere ha ugwu n\'otu nkeji\'\n\nCheta n\'otu ịzụka gara-aga ka emere akwam ozu mmadụ ruru iri asaa egburu na Local Gọọmenti Logo na Guma nke Benue Steeti, e be ihe kariri mmadụ iri ise ka akụkọ kwuru n\'egburu na Taraba Steeti.\n\nEkweremadu gosiri iwe gbasara ogbugbu ndị mmadụ na nzukọ ndị ome-iwu n\'ụbọchị taa, kwuo na Naịjirịa ga-ebu ụzọ nwe udo na nchekwa, tupu e kwuowa okwu iwulite obodo.\n\nỌ sịrị: "Ndị ome-iwu abụghị sọ ọsọ ndị ihe a metụtara, kama ndị Naịjirịa niile.\n\n\'Ike agwụla anyị iji otu nkeji dị jụụ maka nkwanye ugwu. Ihe anyị chọrọ bụ udo na nchekwa tupu echewa echịchị nwuli obodo."',
|
| 89 |
+
'date': '2018-01-19T17:07:38Z',
|
| 90 |
+
'description': "N'ihi oke ogbugbu ndị mmadụ na Naịjirịa gbagburu gburu, osota onyeisi ndị ome-iwu Naịjirịa bụ Ike Ekweremadu ekwuola na ihe Naịjiria chọrọ bụ nchekwa tara ọchịchị, tupu ekwuwa okwu ihe ọzọ.",
|
| 91 |
+
'headline': 'Ekweremadu: Ike agwụla ndị ụlọ ome iwu',
|
| 92 |
+
'source': 'https://www.bbc.com/igbo/42712250',
|
| 93 |
+
'tags': [],
|
| 94 |
+
'title': 'Ekweremadu: Ike agwụla ndị ụlọ ome iwu'}
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
### Data Fields
|
| 98 |
+
|
| 99 |
+
For config 'eze_goes_to_school':
|
| 100 |
+
- format, title, chapters
|
| 101 |
+
|
| 102 |
+
For config 'bbc-igbo' :
|
| 103 |
+
- source, title, description, date (Missing date values replaced with empty strings), headline, content, tags (Missing tags replaced with empty list)
|
| 104 |
+
|
| 105 |
+
For config 'igbo-radio':
|
| 106 |
+
- source, headline, author, date, description, content
|
| 107 |
+
|
| 108 |
+
For config 'jw-ot-igbo':
|
| 109 |
+
- format, title, chapters
|
| 110 |
+
|
| 111 |
+
For config 'jw-nt-igbo':
|
| 112 |
+
- format, title, chapters
|
| 113 |
+
|
| 114 |
+
For config 'jw-books':
|
| 115 |
+
- title, content, format, date (Missing date values replaced with empty strings)
|
| 116 |
+
|
| 117 |
+
For config 'jw-teta':
|
| 118 |
+
- title, content, format, date (Missing date values replaced with empty strings)
|
| 119 |
+
|
| 120 |
+
For config 'jw-ulo_nche':
|
| 121 |
+
- title, content, format, date (Missing date values replaced with empty strings)
|
| 122 |
+
|
| 123 |
+
For config 'jw-ulo_nche_naamu':
|
| 124 |
+
- title, content, format, date (Missing date values replaced with empty strings)
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
### Data Splits
|
| 128 |
+
| bbc-igbo | eze_goes_to_school |igbo-radio| jw-books|jw-nt-igbo| jw-ot-igbo | jw-teta |jw-ulo_nche |jw-ulo_nche_naamu
|
| 129 |
+
| ------------- |:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|
|
| 130 |
+
| 1297 | 1 | 440 | 48 | 27 | 39 | 37 | 55 | 88
|
| 131 |
+
|
| 132 |
+
## Dataset Creation
|
| 133 |
+
|
| 134 |
+
### Curation Rationale
|
| 135 |
+
|
| 136 |
+
[More Information Needed]
|
| 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 |
+
[More Information Needed]
|
| 167 |
+
|
| 168 |
+
### Discussion of Biases
|
| 169 |
+
|
| 170 |
+
[More Information Needed]
|
| 171 |
+
|
| 172 |
+
### Other Known Limitations
|
| 173 |
+
|
| 174 |
+
[More Information Needed]
|
| 175 |
+
|
| 176 |
+
## Additional Information
|
| 177 |
+
|
| 178 |
+
### Dataset Curators
|
| 179 |
+
|
| 180 |
+
[More Information Needed]
|
| 181 |
+
|
| 182 |
+
### Licensing Information
|
| 183 |
+
|
| 184 |
+
[More Information Needed]
|
| 185 |
+
|
| 186 |
+
### Citation Information
|
| 187 |
+
|
| 188 |
+
@misc{ezeani2020igboenglish,
|
| 189 |
+
title={Igbo-English Machine Translation: An Evaluation Benchmark},
|
| 190 |
+
author={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},
|
| 191 |
+
year={2020},
|
| 192 |
+
eprint={2004.00648},
|
| 193 |
+
archivePrefix={arXiv},
|
| 194 |
+
primaryClass={cs.CL}
|
| 195 |
+
}
|
dataset_infos.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"eze_goes_to_school": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"format": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "chapters": {"feature": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "eze_goes_to_school", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 128309, "num_examples": 1, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 128309, "size_in_bytes": 8389256}, "bbc-igbo": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"source": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "description": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "headline": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "tags": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "bbc-igbo", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3488908, "num_examples": 1297, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 3488908, "size_in_bytes": 11749855}, "igbo-radio": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"source": {"dtype": "string", "id": null, "_type": "Value"}, "headline": {"dtype": "string", "id": null, "_type": "Value"}, "author": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "description": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "igbo-radio", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1129644, "num_examples": 440, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 1129644, "size_in_bytes": 9390591}, "jw-ot-igbo": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"format": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "chapters": {"feature": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "jw-ot-igbo", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3489314, "num_examples": 39, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 3489314, "size_in_bytes": 11750261}, "jw-nt-igbo": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"format": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "chapters": {"feature": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "jw-nt-igbo", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1228779, "num_examples": 27, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 1228779, "size_in_bytes": 9489726}, "jw-books": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "format": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "jw-books", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 9456342, "num_examples": 48, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 9456342, "size_in_bytes": 17717289}, "jw-teta": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "format": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "jw-teta", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 991111, "num_examples": 37, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 991111, "size_in_bytes": 9252058}, "jw-ulo_nche": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "format": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "jw-ulo_nche", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1952360, "num_examples": 55, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 1952360, "size_in_bytes": 10213307}, "jw-ulo_nche_naamu": {"description": "A dataset is a collection of Monolingual Igbo sentences.\n", "citation": "@misc{ezeani2020igboenglish,\ntitle={Igbo-English Machine Translation: An Evaluation Benchmark},\nauthor={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},\nyear={2020},\neprint={2004.00648},\narchivePrefix={arXiv},\nprimaryClass={cs.CL}\n}\n", "homepage": "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "format": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "igbo_monolingual", "config_name": "jw-ulo_nche_naamu", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 7248017, "num_examples": 88, "dataset_name": "igbo_monolingual"}}, "download_checksums": {"https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip": {"num_bytes": 8260947, "checksum": "7bafddba34e1541376ed70eee72aceb68080af6eee0474013622698fb11e724d"}}, "download_size": 8260947, "post_processing_size": null, "dataset_size": 7248017, "size_in_bytes": 15508964}}
|
dummy/bbc-igbo/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:14e2c8d71be61965c5310f30f53a8c9555c0cf7566423ec1e866c81ffda2bed0
|
| 3 |
+
size 1210
|
dummy/eze_goes_to_school/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:af84de76c60f6da2536e7d80519e428f3d6446db2600e5773e8c7f1e2ccbc1e4
|
| 3 |
+
size 15867
|
dummy/igbo-radio/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:25cc7cc70929f13972b9e6907f192bc8b383c697e5d8ee61f27d2325a4277091
|
| 3 |
+
size 2703
|
dummy/jw-books/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6517423e010d211a4e2f061c8f9f307cd5bbfc918e1d1680656a9962681fe5bb
|
| 3 |
+
size 3194
|
dummy/jw-nt-igbo/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4627e3363e440e01728397689295de646e70c3f1254be6f6966d1909bde3cf3
|
| 3 |
+
size 21142
|
dummy/jw-ot-igbo/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f2195eaa3be9ad9abb10a8645958705660921a39477505965d434c09126f973
|
| 3 |
+
size 18155
|
dummy/jw-teta/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62a7b9d1933cd2e47ee05cc7c1ae1f8c9db9f003a671a5ab2fe6ec282fcc9186
|
| 3 |
+
size 10390
|
dummy/jw-ulo_nche/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4125e41f0e3da1b351bc4a58fe48c2684705eeaf85dfc6b2c912e94659d3f166
|
| 3 |
+
size 1818
|
dummy/jw-ulo_nche_naamu/1.1.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4cf332dc1ac12a038beafb72bbd7fc3395925ae03d3fc89f56ae223cb26a2591
|
| 3 |
+
size 1988
|
igbo_monolingual.py
ADDED
|
@@ -0,0 +1,367 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"""Igbo Monolingual Dataset"""
|
| 16 |
+
|
| 17 |
+
from __future__ import absolute_import, division, print_function
|
| 18 |
+
|
| 19 |
+
import json
|
| 20 |
+
import os
|
| 21 |
+
|
| 22 |
+
import datasets
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
_CITATION = """\
|
| 26 |
+
@misc{ezeani2020igboenglish,
|
| 27 |
+
title={Igbo-English Machine Translation: An Evaluation Benchmark},
|
| 28 |
+
author={Ignatius Ezeani and Paul Rayson and Ikechukwu Onyenwe and Chinedu Uchechukwu and Mark Hepple},
|
| 29 |
+
year={2020},
|
| 30 |
+
eprint={2004.00648},
|
| 31 |
+
archivePrefix={arXiv},
|
| 32 |
+
primaryClass={cs.CL}
|
| 33 |
+
}
|
| 34 |
+
"""
|
| 35 |
+
|
| 36 |
+
_DESCRIPTION = """\
|
| 37 |
+
A dataset is a collection of Monolingual Igbo sentences.
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
_HOMEPAGE = "https://github.com/IgnatiusEzeani/IGBONLP/tree/master/ig_monoling"
|
| 41 |
+
|
| 42 |
+
_URL = "https://github.com/IgnatiusEzeani/IGBONLP/raw/master/ig_monoling/json.zip"
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
class IgboMonolingual(datasets.GeneratorBasedBuilder):
|
| 46 |
+
"""collection of Monolingual Igbo sentences from different sources"""
|
| 47 |
+
|
| 48 |
+
VERSION = datasets.Version("1.1.0")
|
| 49 |
+
|
| 50 |
+
BUILDER_CONFIGS = [
|
| 51 |
+
datasets.BuilderConfig(
|
| 52 |
+
name="eze_goes_to_school",
|
| 53 |
+
version=VERSION,
|
| 54 |
+
description="Igbo sentences from Master's Thesis; UZOALOR, JOY UCHE",
|
| 55 |
+
),
|
| 56 |
+
datasets.BuilderConfig(
|
| 57 |
+
name="bbc-igbo", version=VERSION, description="Igbo sentences from https://www.bbc.com/igbo/"
|
| 58 |
+
),
|
| 59 |
+
datasets.BuilderConfig(
|
| 60 |
+
name="igbo-radio", version=VERSION, description="Igbo sentences from https://www.igboradio.com"
|
| 61 |
+
),
|
| 62 |
+
datasets.BuilderConfig(
|
| 63 |
+
name="jw-ot-igbo", version=VERSION, description="Igbo sentences from 929 pages of 39 books"
|
| 64 |
+
),
|
| 65 |
+
datasets.BuilderConfig(
|
| 66 |
+
name="jw-nt-igbo", version=VERSION, description="Igbo sentences from 260 pages of 27 books"
|
| 67 |
+
),
|
| 68 |
+
datasets.BuilderConfig(
|
| 69 |
+
name="jw-books", version=VERSION, description="Igbo sentences from 2204 pages of 48 books "
|
| 70 |
+
),
|
| 71 |
+
datasets.BuilderConfig(
|
| 72 |
+
name="jw-teta", version=VERSION, description="Igbo sentences from 392 pages of 37 magazines"
|
| 73 |
+
),
|
| 74 |
+
datasets.BuilderConfig(
|
| 75 |
+
name="jw-ulo_nche", version=VERSION, description="Igbo sentences from 594 pages of 55 magazines"
|
| 76 |
+
),
|
| 77 |
+
datasets.BuilderConfig(
|
| 78 |
+
name="jw-ulo_nche_naamu", version=VERSION, description="Igbo sentences from 870 pages of 88 magazines"
|
| 79 |
+
),
|
| 80 |
+
]
|
| 81 |
+
|
| 82 |
+
def _info(self):
|
| 83 |
+
if self.config.name == "eze_goes_to_school":
|
| 84 |
+
features = datasets.Features(
|
| 85 |
+
{
|
| 86 |
+
"format": datasets.Value("string"),
|
| 87 |
+
"title": datasets.Value("string"),
|
| 88 |
+
"chapters": datasets.Sequence(
|
| 89 |
+
{"title": datasets.Value("string"), "content": datasets.Value("string")}
|
| 90 |
+
),
|
| 91 |
+
}
|
| 92 |
+
)
|
| 93 |
+
elif self.config.name == "bbc-igbo":
|
| 94 |
+
features = datasets.Features(
|
| 95 |
+
{
|
| 96 |
+
"source": datasets.Value("string"),
|
| 97 |
+
"title": datasets.Value("string"),
|
| 98 |
+
"description": datasets.Value("string"),
|
| 99 |
+
"date": datasets.Value("string"),
|
| 100 |
+
"headline": datasets.Value("string"),
|
| 101 |
+
"content": datasets.Value("string"),
|
| 102 |
+
"tags": datasets.Sequence(datasets.Value("string")),
|
| 103 |
+
}
|
| 104 |
+
)
|
| 105 |
+
elif self.config.name == "igbo-radio":
|
| 106 |
+
features = datasets.Features(
|
| 107 |
+
{
|
| 108 |
+
"source": datasets.Value("string"),
|
| 109 |
+
"headline": datasets.Value("string"),
|
| 110 |
+
"author": datasets.Value("string"),
|
| 111 |
+
"date": datasets.Value("string"),
|
| 112 |
+
"description": datasets.Value("string"),
|
| 113 |
+
"content": datasets.Value("string"),
|
| 114 |
+
}
|
| 115 |
+
)
|
| 116 |
+
elif self.config.name == "jw-ot-igbo":
|
| 117 |
+
features = datasets.Features(
|
| 118 |
+
{
|
| 119 |
+
"format": datasets.Value("string"),
|
| 120 |
+
"title": datasets.Value("string"),
|
| 121 |
+
"chapters": datasets.Sequence(
|
| 122 |
+
{"title": datasets.Value("string"), "content": datasets.Value("string")}
|
| 123 |
+
),
|
| 124 |
+
}
|
| 125 |
+
)
|
| 126 |
+
elif self.config.name == "jw-nt-igbo":
|
| 127 |
+
features = datasets.Features(
|
| 128 |
+
{
|
| 129 |
+
"format": datasets.Value("string"),
|
| 130 |
+
"title": datasets.Value("string"),
|
| 131 |
+
"chapters": datasets.Sequence(
|
| 132 |
+
{"title": datasets.Value("string"), "content": datasets.Value("string")}
|
| 133 |
+
),
|
| 134 |
+
}
|
| 135 |
+
)
|
| 136 |
+
elif self.config.name == "jw-books":
|
| 137 |
+
features = datasets.Features(
|
| 138 |
+
{
|
| 139 |
+
"title": datasets.Value("string"),
|
| 140 |
+
"content": datasets.Value("string"),
|
| 141 |
+
"format": datasets.Value("string"),
|
| 142 |
+
"date": datasets.Value("string"),
|
| 143 |
+
}
|
| 144 |
+
)
|
| 145 |
+
elif self.config.name == "jw-teta":
|
| 146 |
+
features = datasets.Features(
|
| 147 |
+
{
|
| 148 |
+
"title": datasets.Value("string"),
|
| 149 |
+
"content": datasets.Value("string"),
|
| 150 |
+
"format": datasets.Value("string"),
|
| 151 |
+
"date": datasets.Value("string"),
|
| 152 |
+
}
|
| 153 |
+
)
|
| 154 |
+
elif self.config.name == "jw-ulo_nche":
|
| 155 |
+
features = datasets.Features(
|
| 156 |
+
{
|
| 157 |
+
"title": datasets.Value("string"),
|
| 158 |
+
"content": datasets.Value("string"),
|
| 159 |
+
"format": datasets.Value("string"),
|
| 160 |
+
"date": datasets.Value("string"),
|
| 161 |
+
}
|
| 162 |
+
)
|
| 163 |
+
elif self.config.name == "jw-ulo_nche_naamu":
|
| 164 |
+
features = datasets.Features(
|
| 165 |
+
{
|
| 166 |
+
"title": datasets.Value("string"),
|
| 167 |
+
"content": datasets.Value("string"),
|
| 168 |
+
"format": datasets.Value("string"),
|
| 169 |
+
"date": datasets.Value("string"),
|
| 170 |
+
}
|
| 171 |
+
)
|
| 172 |
+
return datasets.DatasetInfo(
|
| 173 |
+
description=_DESCRIPTION,
|
| 174 |
+
features=features,
|
| 175 |
+
supervised_keys=None,
|
| 176 |
+
homepage=_HOMEPAGE,
|
| 177 |
+
citation=_CITATION,
|
| 178 |
+
)
|
| 179 |
+
|
| 180 |
+
def _split_generators(self, dl_manager):
|
| 181 |
+
"""Returns SplitGenerators."""
|
| 182 |
+
data_dir = dl_manager.download_and_extract(_URL)
|
| 183 |
+
if self.config.name == "eze_goes_to_school":
|
| 184 |
+
return [
|
| 185 |
+
datasets.SplitGenerator(
|
| 186 |
+
name=datasets.Split.TRAIN,
|
| 187 |
+
gen_kwargs={
|
| 188 |
+
"filepath": os.path.join(data_dir, "eze_goes_to_school.json"),
|
| 189 |
+
"split": "train",
|
| 190 |
+
},
|
| 191 |
+
),
|
| 192 |
+
]
|
| 193 |
+
elif self.config.name == "bbc-igbo":
|
| 194 |
+
return [
|
| 195 |
+
datasets.SplitGenerator(
|
| 196 |
+
name=datasets.Split.TRAIN,
|
| 197 |
+
gen_kwargs={
|
| 198 |
+
"filepath": os.path.join(data_dir, "bbc-igbo.json"),
|
| 199 |
+
"split": "train",
|
| 200 |
+
},
|
| 201 |
+
),
|
| 202 |
+
]
|
| 203 |
+
elif self.config.name == "igbo-radio":
|
| 204 |
+
return [
|
| 205 |
+
datasets.SplitGenerator(
|
| 206 |
+
name=datasets.Split.TRAIN,
|
| 207 |
+
gen_kwargs={
|
| 208 |
+
"filepath": os.path.join(data_dir, "igbo-radio.json"),
|
| 209 |
+
"split": "train",
|
| 210 |
+
},
|
| 211 |
+
),
|
| 212 |
+
]
|
| 213 |
+
elif self.config.name == "jw-ot-igbo":
|
| 214 |
+
return [
|
| 215 |
+
datasets.SplitGenerator(
|
| 216 |
+
name=datasets.Split.TRAIN,
|
| 217 |
+
gen_kwargs={
|
| 218 |
+
"filepath": os.path.join(data_dir, "jw-ot-igbo.json"),
|
| 219 |
+
"split": "train",
|
| 220 |
+
},
|
| 221 |
+
),
|
| 222 |
+
]
|
| 223 |
+
elif self.config.name == "jw-nt-igbo":
|
| 224 |
+
return [
|
| 225 |
+
datasets.SplitGenerator(
|
| 226 |
+
name=datasets.Split.TRAIN,
|
| 227 |
+
gen_kwargs={
|
| 228 |
+
"filepath": os.path.join(data_dir, "jw-nt-igbo.json"),
|
| 229 |
+
"split": "train",
|
| 230 |
+
},
|
| 231 |
+
),
|
| 232 |
+
]
|
| 233 |
+
elif self.config.name == "jw-books":
|
| 234 |
+
return [
|
| 235 |
+
datasets.SplitGenerator(
|
| 236 |
+
name=datasets.Split.TRAIN,
|
| 237 |
+
gen_kwargs={
|
| 238 |
+
"filepath": os.path.join(data_dir, "jw-books.json"),
|
| 239 |
+
"split": "train",
|
| 240 |
+
},
|
| 241 |
+
),
|
| 242 |
+
]
|
| 243 |
+
elif self.config.name == "jw-teta":
|
| 244 |
+
return [
|
| 245 |
+
datasets.SplitGenerator(
|
| 246 |
+
name=datasets.Split.TRAIN,
|
| 247 |
+
gen_kwargs={
|
| 248 |
+
"filepath": os.path.join(data_dir, "jw-teta.json"),
|
| 249 |
+
"split": "train",
|
| 250 |
+
},
|
| 251 |
+
),
|
| 252 |
+
]
|
| 253 |
+
elif self.config.name == "jw-ulo_nche":
|
| 254 |
+
return [
|
| 255 |
+
datasets.SplitGenerator(
|
| 256 |
+
name=datasets.Split.TRAIN,
|
| 257 |
+
gen_kwargs={
|
| 258 |
+
"filepath": os.path.join(data_dir, "jw-ulo_nche.json"),
|
| 259 |
+
"split": "train",
|
| 260 |
+
},
|
| 261 |
+
),
|
| 262 |
+
]
|
| 263 |
+
elif self.config.name == "jw-ulo_nche_naamu":
|
| 264 |
+
return [
|
| 265 |
+
datasets.SplitGenerator(
|
| 266 |
+
name=datasets.Split.TRAIN,
|
| 267 |
+
gen_kwargs={
|
| 268 |
+
"filepath": os.path.join(data_dir, "jw-ulo_nche_naamu.json"),
|
| 269 |
+
"split": "train",
|
| 270 |
+
},
|
| 271 |
+
),
|
| 272 |
+
]
|
| 273 |
+
|
| 274 |
+
def _generate_examples(self, filepath, split):
|
| 275 |
+
""" Yields examples. """
|
| 276 |
+
if self.config.name == "eze_goes_to_school":
|
| 277 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 278 |
+
json_data = json.load(f)
|
| 279 |
+
for id_, data in enumerate(json_data):
|
| 280 |
+
yield id_, {
|
| 281 |
+
"format": data["format"],
|
| 282 |
+
"title": data["title"],
|
| 283 |
+
"chapters": data["chapters"],
|
| 284 |
+
}
|
| 285 |
+
elif self.config.name == "bbc-igbo":
|
| 286 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 287 |
+
json_data = json.load(f)
|
| 288 |
+
for id_, data in enumerate(json_data):
|
| 289 |
+
yield id_, {
|
| 290 |
+
"source": data["source"] if "source" in data.keys() else "",
|
| 291 |
+
"title": data["title"] if "title" in data.keys() else "",
|
| 292 |
+
"description": data["description"] if "description" in data.keys() else "",
|
| 293 |
+
"date": data["date"] if "date" in data.keys() else "",
|
| 294 |
+
"headline": data["headline"] if "headline" in data.keys() else "",
|
| 295 |
+
"content": data["content"] if "content" in data.keys() else "",
|
| 296 |
+
"tags": data["tags"] if "tags" in data.keys() else [],
|
| 297 |
+
}
|
| 298 |
+
elif self.config.name == "igbo-radio":
|
| 299 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 300 |
+
json_data = json.load(f)
|
| 301 |
+
for id_, data in enumerate(json_data):
|
| 302 |
+
yield id_, {
|
| 303 |
+
"source": data["source"],
|
| 304 |
+
"headline": data["headline"],
|
| 305 |
+
"author": data["author"],
|
| 306 |
+
"date": data["date"],
|
| 307 |
+
"description": data["description"] if "description" in data.keys() else "",
|
| 308 |
+
"content": data["content"] if "content" in data.keys() else "",
|
| 309 |
+
}
|
| 310 |
+
elif self.config.name == "jw-ot-igbo":
|
| 311 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 312 |
+
json_data = json.load(f)
|
| 313 |
+
for id_, data in enumerate(json_data):
|
| 314 |
+
yield id_, {
|
| 315 |
+
"format": data["format"],
|
| 316 |
+
"title": data["title"],
|
| 317 |
+
"chapters": data["chapters"],
|
| 318 |
+
}
|
| 319 |
+
elif self.config.name == "jw-nt-igbo":
|
| 320 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 321 |
+
json_data = json.load(f)
|
| 322 |
+
for id_, data in enumerate(json_data):
|
| 323 |
+
yield id_, {
|
| 324 |
+
"format": data["format"],
|
| 325 |
+
"title": data["title"],
|
| 326 |
+
"chapters": data["chapters"],
|
| 327 |
+
}
|
| 328 |
+
elif self.config.name == "jw-books":
|
| 329 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 330 |
+
json_data = json.load(f)
|
| 331 |
+
for id_, data in enumerate(json_data):
|
| 332 |
+
yield id_, {
|
| 333 |
+
"title": data["title"],
|
| 334 |
+
"content": data["content"],
|
| 335 |
+
"format": data["format"],
|
| 336 |
+
"date": data["date"] if "date" in data.keys() else "",
|
| 337 |
+
}
|
| 338 |
+
elif self.config.name == "jw-teta":
|
| 339 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 340 |
+
json_data = json.load(f)
|
| 341 |
+
for id_, data in enumerate(json_data):
|
| 342 |
+
yield id_, {
|
| 343 |
+
"title": data["title"],
|
| 344 |
+
"content": data["content"],
|
| 345 |
+
"format": data["format"],
|
| 346 |
+
"date": data["date"] if "date" in data.keys() else "",
|
| 347 |
+
}
|
| 348 |
+
elif self.config.name == "jw-ulo_nche":
|
| 349 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 350 |
+
json_data = json.load(f)
|
| 351 |
+
for id_, data in enumerate(json_data):
|
| 352 |
+
yield id_, {
|
| 353 |
+
"title": data["title"],
|
| 354 |
+
"content": data["content"],
|
| 355 |
+
"format": data["format"],
|
| 356 |
+
"date": data["date"] if "date" in data.keys() else "",
|
| 357 |
+
}
|
| 358 |
+
elif self.config.name == "jw-ulo_nche_naamu":
|
| 359 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 360 |
+
json_data = json.load(f)
|
| 361 |
+
for id_, data in enumerate(json_data):
|
| 362 |
+
yield id_, {
|
| 363 |
+
"title": data["title"],
|
| 364 |
+
"content": data["content"],
|
| 365 |
+
"format": data["format"],
|
| 366 |
+
"date": data["date"] if "date" in data.keys() else "",
|
| 367 |
+
}
|