Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions asr_evaluation/asr_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ def remove_tail_id(ref, hyp):
"""Assumes that the ID is the final token of the string which is common
in Sphinx but not in Kaldi."""
ref_id = ref[-1]
hyp_id = hyp[-1]
hyp_id = hyp[-2] + ')'
if ref_id != hyp_id:
print('Reference and hypothesis IDs do not match! '
'ref="{}" hyp="{}"\n'
'File lines in hyp file should match those in the ref file.'.format(ref_id, hyp_id))
exit(-1)
ref = ref[:-1]
hyp = hyp[:-1]
hyp = hyp[:-2]
return ref, hyp

def print_instances(ref, hyp, sm, id_=None):
Expand Down