Datasets:
Tasks:
Automatic Speech Recognition
Formats:
parquet
Size:
10K - 100K
Tags:
speech-recognition
License:
Commit
•
930855c
1
Parent(s):
3e2a9f4
Convert dataset to Parquet (#6)
Browse files- Convert dataset to Parquet (7beff1e5a421d047a9f28229ac681d4db8f67167)
- Delete loading script (20892cd408129da347dd6bfaf2537600e13fba00)
- Delete legacy dataset_infos.json (24f1589abffbae2ad06f93222411899539330c7e)
- Delete loading script auxiliary file (889cd98c9b44f9b44f956f8a9b450b14aacac4a2)
- Delete data file (03f53271ad80517a94b09af72335a7bf029410f3)
- Delete data file (26a0749bb4f8376b111bd4124c9daddbf3c72e37)
Co-authored-by: Albert Villanova <albertvillanova@users.noreply.huggingface.co>
- .gitattributes +9 -0
- README.md +36 -5
- dataset_infos.json +0 -162
- dummy/japh1234/1.0.0/dummy_data.zip → japh1234/test-00000-of-00001.parquet +2 -2
- dummy/yong1288/1.0.0/dummy_data.zip → japh1234/train-00000-of-00007.parquet +2 -2
- japh1234/train-00001-of-00007.parquet +3 -0
- japh1234/train-00002-of-00007.parquet +3 -0
- japh1234/train-00003-of-00007.parquet +3 -0
- japh1234/train-00004-of-00007.parquet +3 -0
- japh1234/train-00005-of-00007.parquet +3 -0
- japh1234/train-00006-of-00007.parquet +3 -0
- japh1234/validation-00000-of-00001.parquet +3 -0
- pangloss.py +0 -202
- test.py +0 -3
.gitattributes
CHANGED
@@ -2,3 +2,12 @@ yong1288/train-00000-of-00002.parquet filter=lfs diff=lfs merge=lfs -text
|
|
2 |
yong1288/train-00001-of-00002.parquet filter=lfs diff=lfs merge=lfs -text
|
3 |
yong1288/test-00000-of-00001.parquet filter=lfs diff=lfs merge=lfs -text
|
4 |
yong1288/validation-00000-of-00001.parquet filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
yong1288/train-00001-of-00002.parquet filter=lfs diff=lfs merge=lfs -text
|
3 |
yong1288/test-00000-of-00001.parquet filter=lfs diff=lfs merge=lfs -text
|
4 |
yong1288/validation-00000-of-00001.parquet filter=lfs diff=lfs merge=lfs -text
|
5 |
+
japh1234/train-00000-of-00007.parquet filter=lfs diff=lfs merge=lfs -text
|
6 |
+
japh1234/train-00001-of-00007.parquet filter=lfs diff=lfs merge=lfs -text
|
7 |
+
japh1234/train-00002-of-00007.parquet filter=lfs diff=lfs merge=lfs -text
|
8 |
+
japh1234/train-00003-of-00007.parquet filter=lfs diff=lfs merge=lfs -text
|
9 |
+
japh1234/train-00004-of-00007.parquet filter=lfs diff=lfs merge=lfs -text
|
10 |
+
japh1234/train-00005-of-00007.parquet filter=lfs diff=lfs merge=lfs -text
|
11 |
+
japh1234/train-00006-of-00007.parquet filter=lfs diff=lfs merge=lfs -text
|
12 |
+
japh1234/test-00000-of-00001.parquet filter=lfs diff=lfs merge=lfs -text
|
13 |
+
japh1234/validation-00000-of-00001.parquet filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -21,18 +21,19 @@ pretty_name: Pangloss
|
|
21 |
language_bcp47:
|
22 |
- x-japh1234
|
23 |
- x-yong1288
|
24 |
-
language_details:
|
|
|
25 |
tags:
|
26 |
- speech-recognition
|
27 |
configs:
|
28 |
- config_name: japh1234
|
29 |
data_files:
|
30 |
- split: train
|
31 |
-
path: japh1234/train
|
32 |
- split: test
|
33 |
-
path: japh1234/test
|
34 |
- split: validation
|
35 |
-
path: japh1234/validation
|
36 |
- config_name: yong1288
|
37 |
data_files:
|
38 |
- split: train
|
@@ -42,7 +43,37 @@ configs:
|
|
42 |
- split: validation
|
43 |
path: yong1288/validation-*
|
44 |
dataset_info:
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
features:
|
47 |
- name: path
|
48 |
dtype: string
|
|
|
21 |
language_bcp47:
|
22 |
- x-japh1234
|
23 |
- x-yong1288
|
24 |
+
language_details: jya consists of japh1234 (Glottolog code); nru consists of yong1288
|
25 |
+
(Glottolog code)
|
26 |
tags:
|
27 |
- speech-recognition
|
28 |
configs:
|
29 |
- config_name: japh1234
|
30 |
data_files:
|
31 |
- split: train
|
32 |
+
path: japh1234/train-*
|
33 |
- split: test
|
34 |
+
path: japh1234/test-*
|
35 |
- split: validation
|
36 |
+
path: japh1234/validation-*
|
37 |
- config_name: yong1288
|
38 |
data_files:
|
39 |
- split: train
|
|
|
43 |
- split: validation
|
44 |
path: yong1288/validation-*
|
45 |
dataset_info:
|
46 |
+
- config_name: japh1234
|
47 |
+
features:
|
48 |
+
- name: path
|
49 |
+
dtype: string
|
50 |
+
- name: audio
|
51 |
+
dtype:
|
52 |
+
audio:
|
53 |
+
sampling_rate: 16000
|
54 |
+
- name: sentence
|
55 |
+
dtype: string
|
56 |
+
- name: doctype
|
57 |
+
dtype: string
|
58 |
+
- name: speaker
|
59 |
+
dtype: string
|
60 |
+
- name: translation:fr
|
61 |
+
dtype: string
|
62 |
+
- name: translation:zh
|
63 |
+
dtype: string
|
64 |
+
splits:
|
65 |
+
- name: train
|
66 |
+
num_bytes: 3289610572.247
|
67 |
+
num_examples: 28677
|
68 |
+
- name: test
|
69 |
+
num_bytes: 406912809.016
|
70 |
+
num_examples: 3584
|
71 |
+
- name: validation
|
72 |
+
num_bytes: 413971210.98
|
73 |
+
num_examples: 3585
|
74 |
+
download_size: 4036606025
|
75 |
+
dataset_size: 4110494592.243
|
76 |
+
- config_name: yong1288
|
77 |
features:
|
78 |
- name: path
|
79 |
dtype: string
|
dataset_infos.json
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"japh1234": {
|
3 |
-
"description": "These datasets are extracts from the Pangloss collection and have\nbeen preprocessed for ASR experiments in Na and Japhug.\n",
|
4 |
-
"citation": {
|
5 |
-
"yong1288": "\n@misc{michaud_alexis_2021_5336698,\nauthor = {Michaud, Alexis and\n Galliot, Benjamin and\n Guillaume, S\u00e9verine},\ntitle = {{Yongning Na for Natural Language Processing: a\n single-speaker audio corpus with transcriptions}},\nmonth = aug,\nyear = 2021,\npublisher = {Zenodo},\nversion = {1.0},\ndoi = {10.5281/zenodo.5336698},\nurl = {https://doi.org/10.5281/zenodo.5336698}\n }\n ",
|
6 |
-
"japh1234": "@misc{jacques_guillaume_2021_5521112,\nauthor = {Jacques, Guillaume and\n Galliot, Benjamin and\n Guillaume, S\u00e9verine},\ntitle = {{Japhug for Natural Language Processing: a single-\n speaker audio corpus with transcriptions}},\nmonth = sep,\nyear = 2021,\npublisher = {Zenodo},\nversion = {1.0},\ndoi = {10.5281/zenodo.5521112},\nurl = {https://doi.org/10.5281/zenodo.5521112}\n }\n"
|
7 |
-
},
|
8 |
-
"homepage": "https://pangloss.cnrs.fr/",
|
9 |
-
"license": "https://creativecommons.org/licenses/by-nc-sa/4.0/fr/legalcode",
|
10 |
-
"features": {
|
11 |
-
"path": {
|
12 |
-
"dtype": "string",
|
13 |
-
"_type": "Value"
|
14 |
-
},
|
15 |
-
"audio": {
|
16 |
-
"sampling_rate": 16000,
|
17 |
-
"_type": "Audio"
|
18 |
-
},
|
19 |
-
"sentence": {
|
20 |
-
"dtype": "string",
|
21 |
-
"_type": "Value"
|
22 |
-
},
|
23 |
-
"doctype": {
|
24 |
-
"dtype": "string",
|
25 |
-
"_type": "Value"
|
26 |
-
},
|
27 |
-
"translation:fr": {
|
28 |
-
"dtype": "string",
|
29 |
-
"_type": "Value"
|
30 |
-
},
|
31 |
-
"translation:zh": {
|
32 |
-
"dtype": "string",
|
33 |
-
"_type": "Value"
|
34 |
-
}
|
35 |
-
},
|
36 |
-
"task_templates": [
|
37 |
-
{
|
38 |
-
"task": "automatic-speech-recognition",
|
39 |
-
"transcription_column": "forme"
|
40 |
-
}
|
41 |
-
],
|
42 |
-
"builder_name": "pangloss",
|
43 |
-
"dataset_name": "pangloss",
|
44 |
-
"config_name": "japh1234",
|
45 |
-
"version": {
|
46 |
-
"version_str": "1.0.0",
|
47 |
-
"major": 1,
|
48 |
-
"minor": 0,
|
49 |
-
"patch": 0
|
50 |
-
},
|
51 |
-
"splits": {
|
52 |
-
"train": {
|
53 |
-
"name": "train",
|
54 |
-
"num_bytes": 9894596,
|
55 |
-
"num_examples": 28677,
|
56 |
-
"dataset_name": "pangloss"
|
57 |
-
},
|
58 |
-
"test": {
|
59 |
-
"name": "test",
|
60 |
-
"num_bytes": 1235918,
|
61 |
-
"num_examples": 3584,
|
62 |
-
"dataset_name": "pangloss"
|
63 |
-
},
|
64 |
-
"validation": {
|
65 |
-
"name": "validation",
|
66 |
-
"num_bytes": 1239396,
|
67 |
-
"num_examples": 3585,
|
68 |
-
"dataset_name": "pangloss"
|
69 |
-
}
|
70 |
-
},
|
71 |
-
"download_checksums": {
|
72 |
-
"https://mycore.core-cloud.net/index.php/s/kuQCxmyVcUFWroV/download": {
|
73 |
-
"num_bytes": 3035269521,
|
74 |
-
"checksum": "e01ec3d1ef88e6ae9e6834fb7ac803cfc8f484ba6a33dfdab528fa5cefd36ea9"
|
75 |
-
}
|
76 |
-
},
|
77 |
-
"download_size": 3035269521,
|
78 |
-
"dataset_size": 12369910,
|
79 |
-
"size_in_bytes": 3047639431
|
80 |
-
},
|
81 |
-
"yong1288": {
|
82 |
-
"description": "These datasets are extracts from the Pangloss collection and have\nbeen preprocessed for ASR experiments in Na and Japhug.\n",
|
83 |
-
"citation": {
|
84 |
-
"yong1288": "\n@misc{michaud_alexis_2021_5336698,\nauthor = {Michaud, Alexis and\n Galliot, Benjamin and\n Guillaume, S\u00e9verine},\ntitle = {{Yongning Na for Natural Language Processing: a\n single-speaker audio corpus with transcriptions}},\nmonth = aug,\nyear = 2021,\npublisher = {Zenodo},\nversion = {1.0},\ndoi = {10.5281/zenodo.5336698},\nurl = {https://doi.org/10.5281/zenodo.5336698}\n }\n ",
|
85 |
-
"japh1234": "@misc{jacques_guillaume_2021_5521112,\nauthor = {Jacques, Guillaume and\n Galliot, Benjamin and\n Guillaume, S\u00e9verine},\ntitle = {{Japhug for Natural Language Processing: a single-\n speaker audio corpus with transcriptions}},\nmonth = sep,\nyear = 2021,\npublisher = {Zenodo},\nversion = {1.0},\ndoi = {10.5281/zenodo.5521112},\nurl = {https://doi.org/10.5281/zenodo.5521112}\n }\n"
|
86 |
-
},
|
87 |
-
"homepage": "https://pangloss.cnrs.fr/",
|
88 |
-
"license": "https://creativecommons.org/licenses/by-nc-sa/4.0/fr/legalcode",
|
89 |
-
"features": {
|
90 |
-
"path": {
|
91 |
-
"dtype": "string",
|
92 |
-
"_type": "Value"
|
93 |
-
},
|
94 |
-
"audio": {
|
95 |
-
"sampling_rate": 16000,
|
96 |
-
"_type": "Audio"
|
97 |
-
},
|
98 |
-
"sentence": {
|
99 |
-
"dtype": "string",
|
100 |
-
"_type": "Value"
|
101 |
-
},
|
102 |
-
"doctype": {
|
103 |
-
"dtype": "string",
|
104 |
-
"_type": "Value"
|
105 |
-
},
|
106 |
-
"speaker": {
|
107 |
-
"dtype": "string",
|
108 |
-
"_type": "Value"
|
109 |
-
},
|
110 |
-
"translation:fr": {
|
111 |
-
"dtype": "string",
|
112 |
-
"_type": "Value"
|
113 |
-
},
|
114 |
-
"translation:en": {
|
115 |
-
"dtype": "string",
|
116 |
-
"_type": "Value"
|
117 |
-
},
|
118 |
-
"translation:zh": {
|
119 |
-
"dtype": "string",
|
120 |
-
"_type": "Value"
|
121 |
-
}
|
122 |
-
},
|
123 |
-
"task_templates": [
|
124 |
-
{
|
125 |
-
"task": "automatic-speech-recognition",
|
126 |
-
"transcription_column": "forme"
|
127 |
-
}
|
128 |
-
],
|
129 |
-
"builder_name": "pangloss",
|
130 |
-
"dataset_name": "pangloss",
|
131 |
-
"config_name": "yong1288",
|
132 |
-
"version": {
|
133 |
-
"version_str": "1.0.0",
|
134 |
-
"major": 1,
|
135 |
-
"minor": 0,
|
136 |
-
"patch": 0
|
137 |
-
},
|
138 |
-
"splits": {
|
139 |
-
"train": {
|
140 |
-
"name": "train",
|
141 |
-
"num_bytes": 794594554.85,
|
142 |
-
"num_examples": 8630,
|
143 |
-
"dataset_name": null
|
144 |
-
},
|
145 |
-
"test": {
|
146 |
-
"name": "test",
|
147 |
-
"num_bytes": 103631590.762,
|
148 |
-
"num_examples": 1078,
|
149 |
-
"dataset_name": null
|
150 |
-
},
|
151 |
-
"validation": {
|
152 |
-
"name": "validation",
|
153 |
-
"num_bytes": 97018775.543,
|
154 |
-
"num_examples": 1079,
|
155 |
-
"dataset_name": null
|
156 |
-
}
|
157 |
-
},
|
158 |
-
"download_size": 968237292,
|
159 |
-
"dataset_size": 995244921.155,
|
160 |
-
"size_in_bytes": 1963482213.155
|
161 |
-
}
|
162 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dummy/japh1234/1.0.0/dummy_data.zip → japh1234/test-00000-of-00001.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c9548fa8007bd1c18a8601af8be8689826b14dfe71743aee1a1adf0da9ef719f
|
3 |
+
size 402264115
|
dummy/yong1288/1.0.0/dummy_data.zip → japh1234/train-00000-of-00007.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:171a70669352221884202b940320630821fe34dd99d04e6b8a7233c40d1b1ca1
|
3 |
+
size 455481747
|
japh1234/train-00001-of-00007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e788fa8d29b8ba5b1c8eda9532cff05586d382a8c66546e77193610b80777c45
|
3 |
+
size 459655999
|
japh1234/train-00002-of-00007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:48bd8519f5109648e1009d104c1cf99713459978d9dbd065ece8b05197b5caad
|
3 |
+
size 459409504
|
japh1234/train-00003-of-00007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4106d2f178486efc3e9cc2b8e676b78695c0730320296f2ff42843703e6985b7
|
3 |
+
size 460789955
|
japh1234/train-00004-of-00007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3d84b333401f877293162c5eb9e031a1b01cd6f3e06054754425c757299b4d5e
|
3 |
+
size 467704151
|
japh1234/train-00005-of-00007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bda21af3b2971b74bce8b18d4e40fa0626cf2e80982c6237634884eb88414f44
|
3 |
+
size 464824929
|
japh1234/train-00006-of-00007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3786f2e6e37c5fc453e2c6f1c6e422625b249222e9bf112cec60e9195d997f57
|
3 |
+
size 459263887
|
japh1234/validation-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0c9498e617cdb6d8ef8cb482ac6f13e99fc3fb15110500632a8aedea1a84a39e
|
3 |
+
size 407211738
|
pangloss.py
DELETED
@@ -1,202 +0,0 @@
|
|
1 |
-
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
2 |
-
#
|
3 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
-
# you may not use this file except in compliance with the License.
|
5 |
-
# You may obtain a copy of the License at
|
6 |
-
#
|
7 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
#
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
"""Pangloss datasets for Yongning Na (yong1288) and Japhug (japh1234)"""
|
15 |
-
|
16 |
-
import csv
|
17 |
-
import json
|
18 |
-
import os
|
19 |
-
import datasets
|
20 |
-
from datasets.tasks import AutomaticSpeechRecognition
|
21 |
-
|
22 |
-
_CITATION = {
|
23 |
-
"yong1288": """
|
24 |
-
@misc{michaud_alexis_2021_5336698,
|
25 |
-
author = {Michaud, Alexis and
|
26 |
-
Galliot, Benjamin and
|
27 |
-
Guillaume, Séverine},
|
28 |
-
title = {{Yongning Na for Natural Language Processing: a
|
29 |
-
single-speaker audio corpus with transcriptions}},
|
30 |
-
month = aug,
|
31 |
-
year = 2021,
|
32 |
-
publisher = {Zenodo},
|
33 |
-
version = {1.0},
|
34 |
-
doi = {10.5281/zenodo.5336698},
|
35 |
-
url = {https://doi.org/10.5281/zenodo.5336698}
|
36 |
-
}
|
37 |
-
""",
|
38 |
-
"japh1234": """\
|
39 |
-
@misc{jacques_guillaume_2021_5521112,
|
40 |
-
author = {Jacques, Guillaume and
|
41 |
-
Galliot, Benjamin and
|
42 |
-
Guillaume, Séverine},
|
43 |
-
title = {{Japhug for Natural Language Processing: a single-
|
44 |
-
speaker audio corpus with transcriptions}},
|
45 |
-
month = sep,
|
46 |
-
year = 2021,
|
47 |
-
publisher = {Zenodo},
|
48 |
-
version = {1.0},
|
49 |
-
doi = {10.5281/zenodo.5521112},
|
50 |
-
url = {https://doi.org/10.5281/zenodo.5521112}
|
51 |
-
}
|
52 |
-
"""
|
53 |
-
}
|
54 |
-
|
55 |
-
_DESCRIPTION = """\
|
56 |
-
These datasets are extracts from the Pangloss collection and have
|
57 |
-
been preprocessed for ASR experiments in Na and Japhug.
|
58 |
-
"""
|
59 |
-
|
60 |
-
_HOMEPAGE = "https://pangloss.cnrs.fr/"
|
61 |
-
|
62 |
-
_LICENSE = "https://creativecommons.org/licenses/by-nc-sa/4.0/fr/legalcode"
|
63 |
-
|
64 |
-
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
65 |
-
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
66 |
-
|
67 |
-
_VERSION = datasets.Version("1.0.0")
|
68 |
-
|
69 |
-
_LANGUAGES = {
|
70 |
-
"yong1288": {
|
71 |
-
"url": "https://mycore.core-cloud.net/index.php/s/vaGMeRf4Iij8MWR/download",
|
72 |
-
"homepage": "https://zenodo.org/record/5336698",
|
73 |
-
"description": "Yongning Na dataset",
|
74 |
-
"translations": ["fr", "en", "zh"]
|
75 |
-
},
|
76 |
-
"japh1234": {
|
77 |
-
"url": "https://mycore.core-cloud.net/index.php/s/kuQCxmyVcUFWroV/download",
|
78 |
-
"homepage": "https://zenodo.org/record/5521112",
|
79 |
-
"description": "Japhug dataset",
|
80 |
-
"translations": ["fr", "zh"]
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
# TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
|
85 |
-
class PanglossDataset(datasets.GeneratorBasedBuilder):
|
86 |
-
"""The Pangloss datasets are extracts from Pangloss Collections that can be used for ASR experiments in these languages."""
|
87 |
-
field_translations = {
|
88 |
-
"chemin_audio": "path",
|
89 |
-
"nature": "doctype",
|
90 |
-
"forme": "sentence",
|
91 |
-
"locuteur": "speaker",
|
92 |
-
"traduction:fr": "translation:fr",
|
93 |
-
"traduction:en": "translation:en",
|
94 |
-
"traduction:zh": "translation:zh"
|
95 |
-
}
|
96 |
-
|
97 |
-
# This is an example of a dataset with multiple configurations.
|
98 |
-
# If you don't want/need to define several sub-sets in your dataset,
|
99 |
-
# just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
|
100 |
-
|
101 |
-
# If you need to make complex sub-parts in the datasets with configurable options
|
102 |
-
# You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
|
103 |
-
# BUILDER_CONFIG_CLASS = MyBuilderConfig
|
104 |
-
|
105 |
-
# You will be able to load one or the other configurations in the following list with
|
106 |
-
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
107 |
-
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
108 |
-
BUILDER_CONFIGS = [
|
109 |
-
datasets.BuilderConfig(name=language_name, version=_VERSION, description=language_data["description"])
|
110 |
-
for language_name, language_data in _LANGUAGES.items()
|
111 |
-
]
|
112 |
-
|
113 |
-
#DEFAULT_CONFIG_NAME = "na" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
114 |
-
|
115 |
-
def _info(self):
|
116 |
-
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|
117 |
-
features = datasets.Features(
|
118 |
-
{
|
119 |
-
"path": datasets.Value("string"),
|
120 |
-
"audio": datasets.features.Audio(sampling_rate=16_000),
|
121 |
-
"sentence": datasets.Value("string"),
|
122 |
-
"doctype": datasets.Value("string"),
|
123 |
-
"speaker": datasets.Value("string"),
|
124 |
-
**{f"translation:{language_code}": datasets.Value("string") for language_code in _LANGUAGES[self.config.name]["translations"]}
|
125 |
-
}
|
126 |
-
)
|
127 |
-
|
128 |
-
return datasets.DatasetInfo(
|
129 |
-
# This is the description that will appear on the datasets page.
|
130 |
-
description=_DESCRIPTION,
|
131 |
-
# This defines the different columns of the dataset and their types
|
132 |
-
features=features, # Here we define them above because they are different between the two configurations
|
133 |
-
# If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and
|
134 |
-
# specify them. They'll be used if as_supervised=True in builder.as_dataset.
|
135 |
-
# supervised_keys=("sentence", "label"),
|
136 |
-
# Homepage of the dataset for documentation
|
137 |
-
homepage=_HOMEPAGE,
|
138 |
-
# License for the dataset if available
|
139 |
-
license=_LICENSE,
|
140 |
-
# Citation for the dataset
|
141 |
-
citation=_CITATION,
|
142 |
-
task_templates=[AutomaticSpeechRecognition(audio_column="audio", transcription_column="forme")],
|
143 |
-
|
144 |
-
)
|
145 |
-
|
146 |
-
def _split_generators(self, dl_manager):
|
147 |
-
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
|
148 |
-
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
|
149 |
-
|
150 |
-
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
151 |
-
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
152 |
-
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
153 |
-
urls = _LANGUAGES[self.config.name]["url"]
|
154 |
-
data_dir = dl_manager.download_and_extract(urls)
|
155 |
-
return [
|
156 |
-
datasets.SplitGenerator(
|
157 |
-
name=datasets.Split.TRAIN,
|
158 |
-
# These kwargs will be passed to _generate_examples
|
159 |
-
gen_kwargs={
|
160 |
-
"filepath": os.path.join(data_dir, self.config.name, "train.csv"),
|
161 |
-
"split": "train"
|
162 |
-
},
|
163 |
-
),
|
164 |
-
datasets.SplitGenerator(
|
165 |
-
name=datasets.Split.TEST,
|
166 |
-
# These kwargs will be passed to _generate_examples
|
167 |
-
gen_kwargs={
|
168 |
-
"filepath": os.path.join(data_dir, self.config.name, "test.csv"),
|
169 |
-
"split": "test"
|
170 |
-
},
|
171 |
-
),
|
172 |
-
datasets.SplitGenerator(
|
173 |
-
name=datasets.Split.VALIDATION,
|
174 |
-
# These kwargs will be passed to _generate_examples
|
175 |
-
gen_kwargs={
|
176 |
-
"filepath": os.path.join(data_dir, self.config.name, "validation.csv"),
|
177 |
-
"split": "validation"
|
178 |
-
},
|
179 |
-
),
|
180 |
-
]
|
181 |
-
|
182 |
-
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
183 |
-
def _generate_examples(self, filepath, split):
|
184 |
-
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
185 |
-
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
186 |
-
with open(filepath, encoding="utf-8") as file_descriptor:
|
187 |
-
reader = csv.DictReader(file_descriptor)
|
188 |
-
for key, row in enumerate(reader):
|
189 |
-
translated_fieldnames = [self.field_translations[fieldname] for fieldname in reader.fieldnames if fieldname in self.field_translations.keys()]
|
190 |
-
data = dict(zip(translated_fieldnames, row.values()))
|
191 |
-
data["audio"] = os.path.join(os.path.dirname(filepath), data["path"])
|
192 |
-
# Yields examples as (key, example) tuples
|
193 |
-
yield key, data
|
194 |
-
|
195 |
-
|
196 |
-
if __name__ == "__main__":
|
197 |
-
# for language in _LANGUAGES.keys():
|
198 |
-
datasets.load_dataset("datasets/pangloss/pangloss.py", "japh1234")
|
199 |
-
|
200 |
-
# datasets-cli test datasets/pangloss --save_infos --all_configs
|
201 |
-
# datasets-cli dummy_data datasets/pangloss --auto_generate
|
202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test.py
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
from datasets import load_dataset
|
2 |
-
|
3 |
-
dataset = load_dataset("Lacito/pangloss", "japh1234")
|
|
|
|
|
|
|
|