Datasets:
Convert dataset to Parquet
#10
by
dralois
- opened
- README.md +20 -6
- common_language.py +0 -168
- data/CommonLanguage.zip → full/test-00000-of-00002.parquet +2 -2
- full/test-00001-of-00002.parquet +3 -0
- full/train-00000-of-00007.parquet +3 -0
- full/train-00001-of-00007.parquet +3 -0
- full/train-00002-of-00007.parquet +3 -0
- full/train-00003-of-00007.parquet +3 -0
- full/train-00004-of-00007.parquet +3 -0
- full/train-00005-of-00007.parquet +3 -0
- full/train-00006-of-00007.parquet +3 -0
- full/validation-00000-of-00002.parquet +3 -0
- full/validation-00001-of-00002.parquet +3 -0
README.md
CHANGED
|
@@ -68,11 +68,16 @@ language_bcp47:
|
|
| 68 |
- zh-HK
|
| 69 |
- zh-TW
|
| 70 |
dataset_info:
|
|
|
|
| 71 |
features:
|
| 72 |
- name: client_id
|
| 73 |
dtype: string
|
| 74 |
- name: path
|
| 75 |
dtype: string
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
- name: sentence
|
| 77 |
dtype: string
|
| 78 |
- name: age
|
|
@@ -128,19 +133,28 @@ dataset_info:
|
|
| 128 |
'42': Turkish
|
| 129 |
'43': Ukranian
|
| 130 |
'44': Welsh
|
| 131 |
-
config_name: full
|
| 132 |
splits:
|
| 133 |
- name: train
|
| 134 |
-
num_bytes:
|
| 135 |
num_examples: 22194
|
| 136 |
- name: validation
|
| 137 |
-
num_bytes:
|
| 138 |
num_examples: 5888
|
| 139 |
- name: test
|
| 140 |
-
num_bytes:
|
| 141 |
num_examples: 5963
|
| 142 |
-
download_size:
|
| 143 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
---
|
| 145 |
|
| 146 |
# Dataset Card for common_language
|
|
|
|
| 68 |
- zh-HK
|
| 69 |
- zh-TW
|
| 70 |
dataset_info:
|
| 71 |
+
config_name: full
|
| 72 |
features:
|
| 73 |
- name: client_id
|
| 74 |
dtype: string
|
| 75 |
- name: path
|
| 76 |
dtype: string
|
| 77 |
+
- name: audio
|
| 78 |
+
dtype:
|
| 79 |
+
audio:
|
| 80 |
+
sampling_rate: 48000
|
| 81 |
- name: sentence
|
| 82 |
dtype: string
|
| 83 |
- name: age
|
|
|
|
| 133 |
'42': Turkish
|
| 134 |
'43': Ukranian
|
| 135 |
'44': Welsh
|
|
|
|
| 136 |
splits:
|
| 137 |
- name: train
|
| 138 |
+
num_bytes: 3314277523.844
|
| 139 |
num_examples: 22194
|
| 140 |
- name: validation
|
| 141 |
+
num_bytes: 862605195.664
|
| 142 |
num_examples: 5888
|
| 143 |
- name: test
|
| 144 |
+
num_bytes: 812548374.737
|
| 145 |
num_examples: 5963
|
| 146 |
+
download_size: 4659574007
|
| 147 |
+
dataset_size: 4989431094.245
|
| 148 |
+
configs:
|
| 149 |
+
- config_name: full
|
| 150 |
+
data_files:
|
| 151 |
+
- split: train
|
| 152 |
+
path: full/train-*
|
| 153 |
+
- split: validation
|
| 154 |
+
path: full/validation-*
|
| 155 |
+
- split: test
|
| 156 |
+
path: full/test-*
|
| 157 |
+
default: true
|
| 158 |
---
|
| 159 |
|
| 160 |
# Dataset Card for common_language
|
common_language.py
DELETED
|
@@ -1,168 +0,0 @@
|
|
| 1 |
-
# coding=utf-8
|
| 2 |
-
# Copyright 2021 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 |
-
""" Common Language Dataset"""
|
| 16 |
-
|
| 17 |
-
import os
|
| 18 |
-
|
| 19 |
-
import datasets
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
_DATA_URL = "data/CommonLanguage.zip"
|
| 23 |
-
|
| 24 |
-
_CITATION = """\
|
| 25 |
-
@dataset{ganesh_sinisetty_2021_5036977,
|
| 26 |
-
author = {Ganesh Sinisetty and
|
| 27 |
-
Pavlo Ruban and
|
| 28 |
-
Oleksandr Dymov and
|
| 29 |
-
Mirco Ravanelli},
|
| 30 |
-
title = {CommonLanguage},
|
| 31 |
-
month = jun,
|
| 32 |
-
year = 2021,
|
| 33 |
-
publisher = {Zenodo},
|
| 34 |
-
version = {0.1},
|
| 35 |
-
doi = {10.5281/zenodo.5036977},
|
| 36 |
-
url = {https://doi.org/10.5281/zenodo.5036977}
|
| 37 |
-
}
|
| 38 |
-
"""
|
| 39 |
-
|
| 40 |
-
_DESCRIPTION = """\
|
| 41 |
-
This dataset is composed of speech recordings from languages that were carefully selected from the CommonVoice database.
|
| 42 |
-
The total duration of audio recordings is 45.1 hours (i.e., 1 hour of material for each language).
|
| 43 |
-
The dataset has been extracted from CommonVoice to train language-id systems.
|
| 44 |
-
"""
|
| 45 |
-
|
| 46 |
-
_HOMEPAGE = "https://zenodo.org/record/5036977"
|
| 47 |
-
|
| 48 |
-
_LICENSE = "https://creativecommons.org/licenses/by/4.0/legalcode"
|
| 49 |
-
|
| 50 |
-
_LANGUAGES = [
|
| 51 |
-
"Arabic",
|
| 52 |
-
"Basque",
|
| 53 |
-
"Breton",
|
| 54 |
-
"Catalan",
|
| 55 |
-
"Chinese_China",
|
| 56 |
-
"Chinese_Hongkong",
|
| 57 |
-
"Chinese_Taiwan",
|
| 58 |
-
"Chuvash",
|
| 59 |
-
"Czech",
|
| 60 |
-
"Dhivehi",
|
| 61 |
-
"Dutch",
|
| 62 |
-
"English",
|
| 63 |
-
"Esperanto",
|
| 64 |
-
"Estonian",
|
| 65 |
-
"French",
|
| 66 |
-
"Frisian",
|
| 67 |
-
"Georgian",
|
| 68 |
-
"German",
|
| 69 |
-
"Greek",
|
| 70 |
-
"Hakha_Chin",
|
| 71 |
-
"Indonesian",
|
| 72 |
-
"Interlingua",
|
| 73 |
-
"Italian",
|
| 74 |
-
"Japanese",
|
| 75 |
-
"Kabyle",
|
| 76 |
-
"Kinyarwanda",
|
| 77 |
-
"Kyrgyz",
|
| 78 |
-
"Latvian",
|
| 79 |
-
"Maltese",
|
| 80 |
-
"Mangolian",
|
| 81 |
-
"Persian",
|
| 82 |
-
"Polish",
|
| 83 |
-
"Portuguese",
|
| 84 |
-
"Romanian",
|
| 85 |
-
"Romansh_Sursilvan",
|
| 86 |
-
"Russian",
|
| 87 |
-
"Sakha",
|
| 88 |
-
"Slovenian",
|
| 89 |
-
"Spanish",
|
| 90 |
-
"Swedish",
|
| 91 |
-
"Tamil",
|
| 92 |
-
"Tatar",
|
| 93 |
-
"Turkish",
|
| 94 |
-
"Ukranian",
|
| 95 |
-
"Welsh",
|
| 96 |
-
]
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
class CommonLanguage(datasets.GeneratorBasedBuilder):
|
| 100 |
-
VERSION = datasets.Version("0.1.0")
|
| 101 |
-
|
| 102 |
-
BUILDER_CONFIGS = [
|
| 103 |
-
datasets.BuilderConfig(name="full", version=VERSION, description="The entire Common Language dataset"),
|
| 104 |
-
]
|
| 105 |
-
|
| 106 |
-
def _info(self):
|
| 107 |
-
features = datasets.Features(
|
| 108 |
-
{
|
| 109 |
-
"client_id": datasets.Value("string"),
|
| 110 |
-
"path": datasets.Value("string"),
|
| 111 |
-
"audio": datasets.Audio(sampling_rate=48_000),
|
| 112 |
-
"sentence": datasets.Value("string"),
|
| 113 |
-
"age": datasets.Value("string"),
|
| 114 |
-
"gender": datasets.Value("string"),
|
| 115 |
-
"language": datasets.ClassLabel(names=_LANGUAGES),
|
| 116 |
-
}
|
| 117 |
-
)
|
| 118 |
-
|
| 119 |
-
return datasets.DatasetInfo(
|
| 120 |
-
description=_DESCRIPTION,
|
| 121 |
-
features=features,
|
| 122 |
-
supervised_keys=None,
|
| 123 |
-
homepage=_HOMEPAGE,
|
| 124 |
-
license=_LICENSE,
|
| 125 |
-
citation=_CITATION,
|
| 126 |
-
)
|
| 127 |
-
|
| 128 |
-
def _split_generators(self, dl_manager):
|
| 129 |
-
"""Returns SplitGenerators."""
|
| 130 |
-
|
| 131 |
-
dl_path = dl_manager.download_and_extract(_DATA_URL)
|
| 132 |
-
archive_path = os.path.join(dl_path, "common_voice_kpd")
|
| 133 |
-
|
| 134 |
-
return [
|
| 135 |
-
datasets.SplitGenerator(
|
| 136 |
-
name=datasets.Split.TRAIN,
|
| 137 |
-
gen_kwargs={"archive_path": archive_path, "split": "train"},
|
| 138 |
-
),
|
| 139 |
-
datasets.SplitGenerator(
|
| 140 |
-
name=datasets.Split.VALIDATION,
|
| 141 |
-
gen_kwargs={"archive_path": archive_path, "split": "dev"},
|
| 142 |
-
),
|
| 143 |
-
datasets.SplitGenerator(
|
| 144 |
-
name=datasets.Split.TEST,
|
| 145 |
-
gen_kwargs={"archive_path": archive_path, "split": "test"},
|
| 146 |
-
),
|
| 147 |
-
]
|
| 148 |
-
|
| 149 |
-
def _generate_examples(self, archive_path, split):
|
| 150 |
-
"""Yields examples."""
|
| 151 |
-
key = 0
|
| 152 |
-
for language in _LANGUAGES:
|
| 153 |
-
csv_path = os.path.join(archive_path, language, f"{split}.csv")
|
| 154 |
-
with open(csv_path, encoding="utf-16") as fin:
|
| 155 |
-
next(fin) # skip the header
|
| 156 |
-
for line in fin:
|
| 157 |
-
client_id, wav_name, sentence, age, gender = line.strip().split("\t")[1:]
|
| 158 |
-
path = os.path.join(archive_path, language, split, client_id, wav_name)
|
| 159 |
-
yield key, {
|
| 160 |
-
"client_id": client_id,
|
| 161 |
-
"path": path,
|
| 162 |
-
"audio": path,
|
| 163 |
-
"sentence": sentence,
|
| 164 |
-
"age": age,
|
| 165 |
-
"gender": gender,
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/CommonLanguage.zip → full/test-00000-of-00002.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:8c09ba5c752f4142681d975861d35975dd3883cecc7900e8246be6ce6b7ce61c
|
| 3 |
+
size 393419218
|
full/test-00001-of-00002.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c6965cbcd2b657acce5e2bb60606a4f11d9aaabd18686a4a83c3c219d492066
|
| 3 |
+
size 396561124
|
full/train-00000-of-00007.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e7b6dc86a75c0fd3640511a184cb619bedaa23cd712c0842d9c74d3c4a3af518
|
| 3 |
+
size 417418692
|
full/train-00001-of-00007.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e347e7b6a1150ac36cdd7194660e67ca755817479f5255c03be45317e74955d
|
| 3 |
+
size 433459907
|
full/train-00002-of-00007.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2cb1a9bac7dbecd23625be00f5ab7140efb8526670b4da04b9a9136ad5341d29
|
| 3 |
+
size 489923767
|
full/train-00003-of-00007.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2dd6c7013aca54fd91f45dfb67376da64a6621dfe345092ab9ecb2f896670b32
|
| 3 |
+
size 445508623
|
full/train-00004-of-00007.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f50ae31ae6e4536509965b5dd2637afe9e7a73830044ac48c8a41173d95d057
|
| 3 |
+
size 420110472
|
full/train-00005-of-00007.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0025364ed7dc2243a24b850e50a1fcf5bdefb80173d057c2db241d3317047ea4
|
| 3 |
+
size 488468435
|
full/train-00006-of-00007.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42fb38c777ad3e3ab0814182f671f2dee24d94c4aa2886bc16f04436dc8753e7
|
| 3 |
+
size 394886824
|
full/validation-00000-of-00002.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38a28bcc8fff27a81198440439aba81ba2b58824b86ecf7176cf46bdba539479
|
| 3 |
+
size 395375455
|
full/validation-00001-of-00002.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9cac8ed33ca94883dcdb42e7e36693d649f04c6fd45f0e285d2e52f61a24a083
|
| 3 |
+
size 384441490
|