mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
update
This commit is contained in:
parent
3670095d21
commit
499daf0e8e
@ -28,6 +28,8 @@ def compute_wer(
|
|||||||
ref_dict = {}
|
ref_dict = {}
|
||||||
with open(hyp_file, "r") as hyp_reader:
|
with open(hyp_file, "r") as hyp_reader:
|
||||||
for line in hyp_reader:
|
for line in hyp_reader:
|
||||||
|
if len(line.split()) < 2:
|
||||||
|
continue
|
||||||
key = line.strip().split()[0]
|
key = line.strip().split()[0]
|
||||||
value = line.strip().split()[1:]
|
value = line.strip().split()[1:]
|
||||||
if cn_postprocess:
|
if cn_postprocess:
|
||||||
@ -39,6 +41,8 @@ def compute_wer(
|
|||||||
hyp_dict[key] = value
|
hyp_dict[key] = value
|
||||||
with open(ref_file, "r") as ref_reader:
|
with open(ref_file, "r") as ref_reader:
|
||||||
for line in ref_reader:
|
for line in ref_reader:
|
||||||
|
if len(line.split()) < 2:
|
||||||
|
continue
|
||||||
key = line.strip().split()[0]
|
key = line.strip().split()[0]
|
||||||
value = line.strip().split()[1:]
|
value = line.strip().split()[1:]
|
||||||
if cn_postprocess:
|
if cn_postprocess:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user