fuzzy.BestMatch
Find closest match from candidates list. Optional threshold: returns empty string if best score is below it
fuzzy.BestMatch(target: string, candidates: []any, threshold?: float64) -> string
Arguments
| Name | Type |
|---|---|
| target | string |
| candidates | []any |
| threshold? | float64 |
Example
{{ fuzzy.BestMatch("apple", ["aple", "banana", "apples"], 0.7) }}
Returns "aple".