Datasets:
Yehor Smoliakov
commited on
Commit
•
5506a57
1
Parent(s):
f7a45a0
Add len2dur
Browse files- scripts/add_len2dur_field.py +12 -0
- yodas2/clean.jsonl +2 -2
scripts/add_len2dur_field.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from os.path import dirname
|
2 |
+
import json
|
3 |
+
|
4 |
+
filename = dirname(__file__) + '/../yodas2/clean.jsonl'
|
5 |
+
|
6 |
+
with open(filename, 'r') as f:
|
7 |
+
for line in f:
|
8 |
+
data = json.loads(line)
|
9 |
+
|
10 |
+
data['len2dur'] = round(data['length'] / data['duration'], 3)
|
11 |
+
|
12 |
+
print(json.dumps(data))
|
yodas2/clean.jsonl
CHANGED
@@ -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:b066346c5985360d694e14b58317d7d545bb34df3a16ee4d13f3a52c7cb81f02
|
3 |
+
size 142808120
|