Datasets:
dcd654642b3e5a34570be4f02b4b9b3c3e8b5caeead4e6894c008b4c24b8ea1f
Browse files- count_n_shards.py +22 -0
- n_shards.json +40 -0
count_n_shards.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pathlib import Path
|
2 |
+
import json
|
3 |
+
|
4 |
+
|
5 |
+
splits = ["train", "dev", "test", "other", "invalidated","validated"]
|
6 |
+
|
7 |
+
if 1==1: #__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(dict(sorted(n_files.items(), key=lambda x: x[0])), f, ensure_ascii=False, indent=4)
|
n_shards.json
CHANGED
@@ -71,6 +71,14 @@
|
|
71 |
"invalidated": 1,
|
72 |
"validated": 0
|
73 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
"bg": {
|
75 |
"train": 1,
|
76 |
"dev": 1,
|
@@ -95,6 +103,14 @@
|
|
95 |
"invalidated": 1,
|
96 |
"validated": 0
|
97 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
"ckb": {
|
99 |
"train": 1,
|
100 |
"dev": 1,
|
@@ -127,6 +143,14 @@
|
|
127 |
"invalidated": 1,
|
128 |
"validated": 0
|
129 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
"da": {
|
131 |
"train": 1,
|
132 |
"dev": 1,
|
@@ -135,6 +159,14 @@
|
|
135 |
"invalidated": 1,
|
136 |
"validated": 0
|
137 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
"dv": {
|
139 |
"train": 1,
|
140 |
"dev": 1,
|
@@ -159,6 +191,14 @@
|
|
159 |
"invalidated": 1,
|
160 |
"validated": 0
|
161 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
"et": {
|
163 |
"train": 1,
|
164 |
"dev": 1,
|
|
|
71 |
"invalidated": 1,
|
72 |
"validated": 0
|
73 |
},
|
74 |
+
"be": {
|
75 |
+
"train": 9,
|
76 |
+
"dev": 1,
|
77 |
+
"test": 1,
|
78 |
+
"other": 1,
|
79 |
+
"invalidated": 1,
|
80 |
+
"validated": 0
|
81 |
+
},
|
82 |
"bg": {
|
83 |
"train": 1,
|
84 |
"dev": 1,
|
|
|
103 |
"invalidated": 1,
|
104 |
"validated": 0
|
105 |
},
|
106 |
+
"ca": {
|
107 |
+
"train": 29,
|
108 |
+
"dev": 1,
|
109 |
+
"test": 1,
|
110 |
+
"other": 12,
|
111 |
+
"invalidated": 3,
|
112 |
+
"validated": 0
|
113 |
+
},
|
114 |
"ckb": {
|
115 |
"train": 1,
|
116 |
"dev": 1,
|
|
|
143 |
"invalidated": 1,
|
144 |
"validated": 0
|
145 |
},
|
146 |
+
"cy": {
|
147 |
+
"train": 1,
|
148 |
+
"dev": 1,
|
149 |
+
"test": 1,
|
150 |
+
"other": 1,
|
151 |
+
"invalidated": 1,
|
152 |
+
"validated": 0
|
153 |
+
},
|
154 |
"da": {
|
155 |
"train": 1,
|
156 |
"dev": 1,
|
|
|
159 |
"invalidated": 1,
|
160 |
"validated": 0
|
161 |
},
|
162 |
+
"de": {
|
163 |
+
"train": 15,
|
164 |
+
"dev": 1,
|
165 |
+
"test": 1,
|
166 |
+
"other": 1,
|
167 |
+
"invalidated": 2,
|
168 |
+
"validated": 0
|
169 |
+
},
|
170 |
"dv": {
|
171 |
"train": 1,
|
172 |
"dev": 1,
|
|
|
191 |
"invalidated": 1,
|
192 |
"validated": 0
|
193 |
},
|
194 |
+
"eo": {
|
195 |
+
"train": 4,
|
196 |
+
"dev": 1,
|
197 |
+
"test": 1,
|
198 |
+
"other": 5,
|
199 |
+
"invalidated": 4,
|
200 |
+
"validated": 0
|
201 |
+
},
|
202 |
"et": {
|
203 |
"train": 1,
|
204 |
"dev": 1,
|