Registry / data / fuzzy
library1.2.2pypypiunverified

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.

pip install fuzzy
INSTALL
IMPORT
SIG · FUZZY
F
fuzzy
datapythonv1.2.2
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.910 runs
build_error
glibc
py 3.10–3.910 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

soundex
✓ import fuzzy fuzzy.soundex('example')
✗ from fuzzy import soundex
While direct import may work in some environments, the official and most robust way to access algorithms is via the fuzzy module object.
nysiis
✓ import fuzzy fuzzy.nysiis('example')
Access phonetic algorithms directly from the fuzzy module.
metaphone
✓ import fuzzy fuzzy.metaphone('example')
Access phonetic algorithms directly from the fuzzy module.
dm_metaphone
✓ import fuzzy fuzzy.dm_metaphone('example')
Access phonetic algorithms directly from the fuzzy module. Note that dm_metaphone returns a tuple.

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}")
Debug
Known issues
gotchaThe `dm_metaphone` (Double Metaphone) function returns a tuple of two phonetic codes (or one code and None), unlike other algorithms which return a single string.
fix
Always unpack or index the result of `dm_metaphone`, e.g., `code1, code2 = fuzzy.dm_metaphone('example')`.
affects: >=1.1.0
gotchaAll phonetic algorithm functions strictly expect string inputs. Passing `None`, integers, or other non-string types will result in a `TypeError`.
fix
Ensure inputs are cast to strings, e.g., `fuzzy.soundex(str(my_number))` or handle potential `None` values before calling the functions.
affects: All
Upgrade
Version history
1.2.2latest on PyPI · released Oct 16, 2017
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
fuzzy — pip install fuzzy · libregistry