Skip to main content

score

Function score 

Source
pub fn score(text: &str, truth: &str, terms: &[String]) -> (f64, f64)
Expand description

Term accuracy and word error rate of text against truth.

Term accuracy is the share of terms that survived as whole words - playwright misspelled as playright is a miss, in the middle of an otherwise perfect sentence. WER is Levenshtein edits over words over the truth’s word count; a truth with no words reads as no error rather than dividing by zero. Neither figure is meaningful for a take, whose truth is a model’s own output; only the read-aloud passage carries words somebody knows were said.