lev_best_match {levitate} | R Documentation |
Get the best matched string from a list of candidates
Description
Given an input
string and multiple candidates
, return the candidate with the best score as
calculated by .fn
.
Usage
lev_best_match(input, candidates, .fn = lev_ratio, ..., decreasing = TRUE)
Arguments
input |
A single string |
candidates |
One or more candidate strings to score |
.fn |
The scoring function to use, as a string or function object. Defaults to
|
... |
Additional arguments to pass to |
decreasing |
If |
Value
A string
See Also
Examples
lev_best_match("bilbo", c("frodo", "gandalf", "legolas"))
[Package levitate version 0.2.0 Index]