Skip to main content

contained_similarity

Function contained_similarity 

Source
pub fn contained_similarity(expected: &str, heard: &str) -> f64
Expand description

How closely expected appears somewhere in heard: the best similarity between expected and a run of consecutive words of heard about as long as it (within a tenth either way). A model turn that says the required text and something else, such as “Welcome to Bright Smile. This call may be recorded. How can I help?”, scores as the text alone.