Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with Sphinx format #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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