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
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-1.0.4.tar.gz
.
File metadata
- Download URL: phonetics-1.0.4.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a91a99c541311b5de728009dc4450b201ffca250e825918c5e29ccbaf1507fbb |
|
MD5 | a09e7eb7a60bcbabe681d51c2250ade6 |
|
BLAKE2b-256 | eb5ae7fcd3eb660a874f69a161cebfe0676ba9bc5b63c1a96b9422712232c98e |
File details
Details for the file phonetics-1.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: phonetics-1.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2af5e39ef0569882c313f6641087ce3b1b27ec7c308421d27d5aafe2fc8feda2 |
|
MD5 | 6248c6d8f79843e340236ac8db469f9e |
|
BLAKE2b-256 | 6bcf8d6ad47a37ca8eaacf44d8c07cfadc1bda51139d3c38f12edc691ebe227c |