Utilities · zero-dependency · MIT

larzfuzzy

Fuzzy string matching.

Levenshtein distance, similarity ratio, Jaro-Winkler and best-match extraction with case-normalization — fuzzywuzzy-style matching with no dependency.

larzscript pkg install fuzzy
View on GitHub →Learn the stack

What you get

Try it

import "fuzzy" as fuzzy
print(fuzzy.levenshtein("kitten", "sitting"))
print(round(fuzzy.ratio("kitten", "sitting"), 3))
print(round(fuzzy.jaro_winkler("martha", "marhta"), 3))
print(fuzzy.extract_one("aple", ["apple", "grape", "orange"]))
Output
3
0.571
0.961
{choice: apple, score: 0.8}

Why it's in the Larz Stack

larzfuzzy is a real Larzscript package (larzscript pkg install fuzzy) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.