A Python 3 library for phonetic encoding algorithms including Soundex, Metaphone, Double Metaphone, and others. Current version is 0.5.3, with infrequent releases.
pip install pyphoneticsVerified import paths — ran on the pinned version, not inferred.
Encode a word using Soundex phonetic algorithm.
Update code to expect a string or use `from pyphonetics import Soundex; code = soundex.phonetics('word')` and treat as string.Always convert input to uppercase before passing: `soundex.phonetics(word.upper())`
Check the return type: for DoubleMetaphone, use `result = dm.phonetics(word); primary, secondary = result`.
Sanitize input to only contain letters (A-Z) before encoding.
Use `from pyphonetics import Soundex` directly.
Avoid using `phonetics` as a variable name.
Strip non-alphabetic characters: `re.sub(r'[^A-Za-z]', '', word)`.
No dependency data recorded yet.