def get_wer()

in vizseq/scorers/_wer.py [0:0]


def get_wer(reference: List[str], hypothesis: str) -> WerScore:
    all_scores = [_get_wer(r.split(), hypothesis.split()) for r in reference]
    return WerScore(
        wer=np.min([s.wer for s in all_scores]),
        len_r=np.max([s.len_r for s in all_scores]),
        deletion=np.min([s.deletion for s in all_scores]),
        substitution=np.min([s.substitution for s in all_scores]),
        insertion=np.min([s.insertion for s in all_scores]),
    )