Skip to main content

match_label

Function match_label 

Source
pub fn match_label(output: &str, labels: &[String]) -> String
Expand description

Pick the label the model’s output best corresponds to: an exact (case-insensitive) match first, then a label contained in the output, else the first label as a safe default.