Fuzzy

1.2.2 · active · verified Fri Apr 17

Fuzzy is a Python library providing fast implementations of phonetic algorithms such as Soundex, NYSIIS, Metaphone, and Double Metaphone. It is currently at version 1.2.2. Its release cadence is generally infrequent, focusing on stability and bug fixes for its core set of algorithms.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to import the fuzzy library and apply its main phonetic algorithms (Soundex, NYSIIS, Metaphone, Double Metaphone) to a given word, printing the resulting codes.

import fuzzy

word = 'Washington'
soundex_code = fuzzy.soundex(word)
nysiis_code = fuzzy.nysiis(word)
metaphone_code = fuzzy.metaphone(word)
dm_metaphone_code = fuzzy.dm_metaphone(word)

print(f"Original: {word}")
print(f"Soundex: {soundex_code}")
print(f"NYSIIS: {nysiis_code}")
print(f"Metaphone: {metaphone_code}")
print(f"Double Metaphone: {dm_metaphone_code}")

view raw JSON →