Compute phonetic key of strings for indexing or fuzzy matching
Project description
The phonetics module computes the phonetic key of a string using different algorithms.
Soundex
NYSISS
Metaphone
Double Metaphone
Installation
Latest PyPI stable release
pip install phonetics
Latest development release on github
Pull and install in the current directory:
pip install -e git+https://github.com/Zack--/phonetics.git@master#egg=phonetics
Running tests
$ python -m unittest discover phonetics/tests/ -v
Or
nosetests --with-coverage --cover-package=phonetics
Usage
>>> import phonetics
>>> phonetics.dmetaphone('Danger')
('TNJR', 'TNKR')
Module Contents
The phonetics module defines the following function:
- phonetics. soundex(source [, size=4])
Use the soundex algorithm to create the phonetic key of the source string.
- phonetics. nysiis(source)
Use the New York State Identification and Intelligence System to create the phonetic key of the source string.
- phonetics. metaphone(source)
- Use the metaphone algorithm to create the phonetic key of the source string.Based on Lawrence Philips’ Metaphone Algorithm.
- phonetics. dmetaphone(source)
- Use the double methaphone algorithm to create the phonetic key of the source string.Based on Lawrence Philips’ Metaphone Algorithm.
Contributions
All source code is hosted on GitHub. Contributions are welcome.
See the CONTRIBUTING file for more information.
LICENCE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file phonetics-py-1.0.5.tar.gz
.
File metadata
- Download URL: phonetics-py-1.0.5.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 670c0551792bbcca23933fffb61d84367f60e6e32964196f9c72b3b1eb6ed1e9 |
|
MD5 | cddb454469a286d4a38b3278080b2ef9 |
|
BLAKE2b-256 | f7f749457b866597d6f4d81c928ea908a9fc70482db8271e796ff85e648c7be5 |
File details
Details for the file phonetics_py-1.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: phonetics_py-1.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ce0c1a06f3cadb064781a02b2222b663f38f820d3aeec7601a87bba17c6dff |
|
MD5 | 1896ecbfd9baa6539b5b0ce6b762e76a |
|
BLAKE2b-256 | 2e2344a1a794bd119981a27acf307a2fc02df07b372873aa54c92a234959b77b |