Computes a similarity score based on how words sound when pronounced.
phonetic_distance
uses a Soundex phonetic algorithms to compute a similarity score between two words. The language can be provided. When not provided, the returned score will be the lowest across all supported languages.
pip install phonetic_distance
or
pip install git+https://github.com/gaspardpetit/phonetic_distance-py.git
phonetic_distance Gilles Jill
phonetic_distance Gilles Bill
phonetic_distance Gilles Robert
Prints:
0
1
4
from phonphonetic_distance import phonetic_distance
print(phonetic_distance("Gilles", "Jill"))
print(phonetic_distance("Gilles", "Bill"))
print(phonetic_distance("Gilles", "Robert"))
Prints
0
1
4
The objective of this project is to support as many languages as possible. Feel free to reach out if you can contribute. The main languages I will personally attempt to support are English, French, Spanish, Italian and Japanese.
phonetic_distance
is released under the MIT license. Feel free to use, modify, and distribute it according to the terms of the license.
This project depends on the following other projects: