Uses heuristic algorithm to suggest a stringdist metric from among hamming, lv, osa, dl, lcs, jw

select_metric(messy_v, clean_v)

Arguments

messy_v

a messy vector of strings

clean_v

a vector of strings for messy_v to be matched against

Value

a string representing the suggested stringdist metric

Details

for each metric, measures certainty via the difference between the best matches for each word and

See also

Examples

select_metric(c("aapple", "bamana", "clemtidne"), c("apple", "banana", "clementine"))
#> [1] "lv"