Macro test_data_generation::levenshtein_distance [−][src]
macro_rules! levenshtein_distance {
($c : expr, $e : expr) => { ... };
}
Expand description
This macro calculates the levenshtein distance between 2 strings. See: https://crates.io/crates/levenshtein
Arguments
control: &String
- The string to compare against. This would be the real data from the data sample.experiment: &String
- The string to compare. This would be the generated data for which you want to find the distance.
#Example
assert_eq!(levenshtein_distance!("kitten", "sitting"), 3 as usize);