Find closest match
Compare a text with every entry of a list and return the closest entry when it scores at least the threshold.
Command in the Fuzzy Match toolkit · id ooa.fuzzy/best_match · 6 inputs (1 required), 4 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | No | Text to look for (or use text_file). | |
| Candidates | List | Yes | Entries to compare with, e.g. a list of customer names. | |
| Threshold | Number | No | 80 | Lowest score (0 to 100) accepted as a match. |
| Algorithm | String | No | levenshtein | levenshtein: edit distance, good for typos. jaro_winkler: favours a shared start, good for short names. token_sort: ignores word order. token_set: ignores word order and extra words. |
| Case sensitive | Boolean | No | false | Treat upper and lower case as different. |
| Text file | File | No | Text file whose content to look for, instead of text; spaces and line breaks at both ends are removed. |
Outputs
| Output | Type | What it is |
|---|---|---|
| found | Boolean | True when an entry reached the threshold. |
| match | String | Closest entry, empty when none reached the threshold. |
| score | Number | Score of the closest entry (0 to 100), even when below the threshold. |
| index | Number | Zero-based position of the match in the list, -1 when none. |