Skip to main content

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​

InputTypeRequiredDefaultWhat it is
TextStringNoText to look for (or use text_file).
CandidatesListYesEntries to compare with, e.g. a list of customer names.
ThresholdNumberNo80Lowest score (0 to 100) accepted as a match.
AlgorithmStringNolevenshteinlevenshtein: 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 sensitiveBooleanNofalseTreat upper and lower case as different.
Text fileFileNoText file whose content to look for, instead of text; spaces and line breaks at both ends are removed.

Outputs​

OutputTypeWhat it is
foundBooleanTrue when an entry reached the threshold.
matchStringClosest entry, empty when none reached the threshold.
scoreNumberScore of the closest entry (0 to 100), even when below the threshold.
indexNumberZero-based position of the match in the list, -1 when none.