Soundex
raw JSON → 1.1.3 verified Mon Apr 27 auth: no python
Soundex algorithm implementation for English and Indian languages. Version 1.1.3. Stable, low release cadence.
pip install soundex Common errors
error ModuleNotFoundError: No module named 'soundex' ↓
cause Package not installed or wrong import casing.
fix
Run 'pip install soundex', then import using 'from soundex import Soundex'.
error ImportError: cannot import name 'soundex' from 'soundex' ↓
cause Attempting to import 'soundex' instead of 'Soundex' (class).
fix
Use 'from soundex import Soundex' and instantiate with Soundex().
Warnings
gotcha The module name is all lowercase 'soundex', not 'Soundex'. Import with from soundex import Soundex. ↓
fix Use 'from soundex import Soundex' or 'import soundex'.
gotcha The library uses uppercase 'Soundex' for the class, but the function version 'soundex' is also available if imported differently. ↓
fix Check documentation: the class-based API is preferred.
Imports
- Soundex
from soundex import Soundex
Quickstart
from soundex import Soundex
s = Soundex()
print(s.soundex('Washington')) # Output: W252
print(s.soundex('Deus')) # Output: D200