Datasets:

Modalities:
Audio
Text
ArXiv:
Libraries:
Datasets
License:
polinaeterna HF staff commited on
Commit
2a52bb5
2 Parent(s): a7341b8 629b66e

Merge branch 'streaming' of https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0 into streaming

Browse files
Files changed (2) hide show
  1. count_n_shards.py +22 -0
  2. n_shards.json +35 -0
count_n_shards.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ import json
3
+
4
+
5
+ splits = ["dev", "test", "other", "invalidated", "train"]
6
+
7
+ if __name__ == "__main__":
8
+ n_files = {}
9
+ lang_dirs = [d for d in Path("audio").iterdir() if d.is_dir()]
10
+ for lang_dir in lang_dirs:
11
+ lang = lang_dir.name
12
+ n_files[lang] = {}
13
+ for split in splits:
14
+ split_dir = lang_dir / split
15
+ if split_dir.exists():
16
+ n_files_per_split = len(list(split_dir.glob("*.tar")))
17
+ else:
18
+ n_files_per_split = 0
19
+ n_files[lang][split] = n_files_per_split
20
+
21
+ with open("n_shards.json", "w") as f:
22
+ json.dump(n_files, f, ensure_ascii=False, indent=4)
n_shards.json CHANGED
@@ -55,6 +55,20 @@
55
  "invalidated": 1,
56
  "train": 1
57
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  "gn": {
59
  "dev": 1,
60
  "test": 1,
@@ -258,6 +272,13 @@
258
  "invalidated": 1,
259
  "train": 1
260
  },
 
 
 
 
 
 
 
261
  "cv": {
262
  "dev": 1,
263
  "test": 1,
@@ -307,6 +328,13 @@
307
  "invalidated": 1,
308
  "train": 1
309
  },
 
 
 
 
 
 
 
310
  "th": {
311
  "dev": 1,
312
  "test": 1,
@@ -335,6 +363,13 @@
335
  "invalidated": 1,
336
  "train": 9
337
  },
 
 
 
 
 
 
 
338
  "bg": {
339
  "dev": 1,
340
  "test": 1,
 
55
  "invalidated": 1,
56
  "train": 1
57
  },
58
+ "kab": {
59
+ "dev": 1,
60
+ "test": 1,
61
+ "other": 3,
62
+ "invalidated": 1,
63
+ "train": 4
64
+ },
65
+ "fa": {
66
+ "dev": 1,
67
+ "test": 1,
68
+ "other": 1,
69
+ "invalidated": 1,
70
+ "train": 1
71
+ },
72
  "gn": {
73
  "dev": 1,
74
  "test": 1,
 
272
  "invalidated": 1,
273
  "train": 1
274
  },
275
+ "es": {
276
+ "dev": 1,
277
+ "test": 1,
278
+ "other": 30,
279
+ "invalidated": 2,
280
+ "train": 6
281
+ },
282
  "cv": {
283
  "dev": 1,
284
  "test": 1,
 
328
  "invalidated": 1,
329
  "train": 1
330
  },
331
+ "ja": {
332
+ "dev": 1,
333
+ "test": 1,
334
+ "other": 1,
335
+ "invalidated": 1,
336
+ "train": 1
337
+ },
338
  "th": {
339
  "dev": 1,
340
  "test": 1,
 
363
  "invalidated": 1,
364
  "train": 9
365
  },
366
+ "lg": {
367
+ "dev": 1,
368
+ "test": 1,
369
+ "other": 1,
370
+ "invalidated": 1,
371
+ "train": 2
372
+ },
373
  "bg": {
374
  "dev": 1,
375
  "test": 1,