Find the best lev_ratio()
between substrings.
lev_partial_ratio(a, b, pairwise = TRUE, useNames = TRUE, ...)
a | The input strings |
---|---|
b | The input strings |
pairwise | Boolean. If |
useNames | Boolean. Use input vectors as row and column names? |
... | Additional arguments to be passed to |
A numeric scalar, vector or matrix depending on the length of the inputs.
If string a
has length len_a
and is shorter than string b
, this function finds the highest
lev_ratio()
of all the len_a
-long substrings of b
(and vice versa).
lev_ratio("Bruce Springsteen", "Bruce Springsteen and the E Street Band") #> [1] 0.4358974 # Here the two "Bruce Springsteen" strings will match perfectly. lev_partial_ratio("Bruce Springsteen", "Bruce Springsteen and the E Street Band") #> [1] 1