Pyphonetics
Pyphonetics is a Python 3 library for phonetic algorithms. Right now, the following algorithms are implemented and supported:
Soundex
Metaphone
Refined Soundex
Fuzzy Soundex
Lein
Matching Rating Approach
More will be added in the future.
Instalation
The module is available in PyPI, just use pip install pyphonetics.
Usage
>>> from pyphonetics import Soundex
>>> soundex = Soundex()
>>> soundex.phonetics('Rupert')
'R163'
>>> soundex.phonetics('Robert')
'R163'
>>> soundex.sounds_like('Robert', 'Rupert')
True
The same API applies to every algorithm, e.g:
>>> from pyphonetics import Metaphone
>>> metaphone = Metaphone()
>>> metaphone.phonetics('discrimination')
'TSKRMNXN'
You can also use the distance(word1, word2, metric=’levenshtein’) method to find the distance between 2 phonetic representations.
>>> from pyphonetics import RefinedSoundex
>>> rs = RefinedSoundex()
>>> rs.distance('Rupert', 'Robert')
0
>>> rs.distance('assign', 'assist', metric='hamming')
2
Credits
The module was largely based on the implementation of phonetic algorithms found in the Talisman.js (https://github.com/Yomguithereal/talisman) Node NLP library.
Metadata
Release files for pyphonetics 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyphonetics-0.5.3.tar.gz | 10.3 kB | Without provenance | Details for pyphonetics-0.5.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyphonetics-0.5.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for pyphonetics-0.5.3-py2.py3-none-any.whl |
Total release size: 21.0 kB
Release files / pyphonetics-0.5.3.tar.gz
| Download URL | pyphonetics-0.5.3.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d3c2e359fde91a3c57914f0b5468bba7a5daf38e7927fd999992ea68990fbe4
|
|
BLAKE2b-256 checksum How to use checksums |
d67c7c45a9e9bf6ddb57b67e66cf4e8076a7baf3a790a3411daac1a7a2df0c5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.18.4
|
Release files / pyphonetics-0.5.3-py2.py3-none-any.whl
| Download URL | pyphonetics-0.5.3-py2.py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e6b29671d0d624dda1cac59c0c5a8a7216d8db504bae4941bfc482e04a0621d1
|
|
BLAKE2b-256 checksum How to use checksums |
bddda7d0a860efd3d4335d538b4361b8e9af8311f2aba2e8c7e4c7a47d623b6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.18.4
|
Security for pyphonetics 0.5.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.