| lev_partial_ratio {levitate} | R Documentation |
Ratio of the best-matching substring
Description
Find the best lev_ratio() between substrings.
Usage
lev_partial_ratio(a, b, pairwise = TRUE, useNames = TRUE, ...)
Arguments
a, b |
The input strings |
pairwise |
Boolean. If |
useNames |
Boolean. Use input vectors as row and column names? |
... |
Additional arguments to be passed to |
Value
A numeric scalar, vector or matrix depending on the length of the inputs.
Details
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).
Examples
lev_ratio("Bruce Springsteen", "Bruce Springsteen and the E Street Band")
# Here the two "Bruce Springsteen" strings will match perfectly.
lev_partial_ratio("Bruce Springsteen", "Bruce Springsteen and the E Street Band")
[Package levitate version 0.2.0 Index]