mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
9fe7ad7f8a
commit
739f6faa5b
Binary file not shown.
@ -807,18 +807,19 @@ def main():
|
|||||||
print(k, v)
|
print(k, v)
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
for line in jsons:
|
if 0:
|
||||||
splited = line.split()
|
for line in jsons:
|
||||||
utt_id = splited[1][1:-2]
|
splited = line.split()
|
||||||
text_idx = splited.index('"text":')
|
utt_id = splited[1][1:-2]
|
||||||
|
text_idx = splited.index('"text":')
|
||||||
|
|
||||||
pseudo = f'"greedy pseudo text": "{res_dict[utt_id]}",'
|
pseudo = f'"greedy pseudo text": "{res_dict[utt_id]}",'
|
||||||
#splited.insert(text_idx, pseudo)
|
#splited.insert(text_idx, pseudo)
|
||||||
splited.insert(len(splited)-2, pseudo)
|
splited.insert(len(splited)-2, pseudo)
|
||||||
new_line = ' '.join(splited)
|
new_line = ' '.join(splited)
|
||||||
new_line += '\n'
|
new_line += '\n'
|
||||||
|
|
||||||
new_jsons.write(new_line)
|
new_jsons.write(new_line)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
for test_set, test_dl in zip(test_sets, test_dl):
|
for test_set, test_dl in zip(test_sets, test_dl):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user