thomas0104's picture
Upload 26 files
aee2b04
raw
history blame contribute delete
322 Bytes
import jiwer
p = open('pred.txt','r',encoding="utf-8")
l = open('label.txt','r',encoding="utf-8")
pred = p.readline().split('=')[1]
label = l.readline().split('=')[1]
wer = jiwer.wer(label, pred)
print(f'{wer=}')
pred = pred.replace(' ', '')
label = label.replace(' ', '')
cer = jiwer.cer(label, pred)
print(f'{cer=}')