macro_rules! token_sort_ratio {
    ($str1:expr, $str2:expr) => { ... };
}
Expand description

Splits both strings into tokens, sorts them and calculates the similarity between sorted words.

Example

let str1 = "My mom bought me ice cream";
let str2 = "The ice cream was bought by my mom";
let similiarity = fuzzy_match_flex::token_sort_ratio!(str1, str2);

assert_eq!(similiarity, 0.8666667);