Justyna Krzywdziak
commited on
Commit
·
caf2ac9
1
Parent(s):
321eea4
fixes
Browse files
MOCKS.py
CHANGED
|
@@ -479,13 +479,13 @@ class Mocks(datasets.GeneratorBasedBuilder):
|
|
| 479 |
trans_col_name = "adversary_keyword_transcription"
|
| 480 |
|
| 481 |
with open(transcription, encoding="utf-8") as f:
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
|
| 490 |
inside_clips_dir = True
|
| 491 |
id_ = 0
|
|
|
|
| 479 |
trans_col_name = "adversary_keyword_transcription"
|
| 480 |
|
| 481 |
with open(transcription, encoding="utf-8") as f:
|
| 482 |
+
for row in f:
|
| 483 |
+
r = row.split(r"\t")
|
| 484 |
+
print(row)
|
| 485 |
+
audio_id = r[0].split("/")[-1]
|
| 486 |
+
keyword = r[1]
|
| 487 |
+
metadata[audio_id] = {"audio_id": audio_id,
|
| 488 |
+
trans_col_name: ngram}
|
| 489 |
|
| 490 |
inside_clips_dir = True
|
| 491 |
id_ = 0
|