Compute operational differences between two sequences/texts using the Levenshtein algorithm
Project description
levenshtein-distance
Compute operational differences between two sequences/texts using the Levenshtein algorithm
Installation:
pip install levenshtein-distance
Usage:
Regular Usage:
from levenshtein_distance import Levenshtein
lev_object = Levenshtein('test', 'text')
distance = lev_object.distance()
ratio = lev_object.ratio()
array = lev_object.sequence_array()
With replace operation cost of 2:
lev_object = Levenshtein('test', 'text').set_replace_cost(2)
distance = lev_object.distance()
ratio = lev_object.ratio()
array = lev_object.sequence_array()
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
Close
Hashes for levenshtein-distance-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2c9ea8f7ae04524a584dc806672871c0e1354e623155a7cb11b2a5852e17cc |
|
MD5 | a6bcef103c22ca8006993de561ca4dac |
|
BLAKE2b-256 | f4a7b7cdd9c8861c021a9491fca5516caed8a9cb57c269ca0f8983c22015adb7 |
Close
Hashes for levenshtein_distance-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b84ff10a4ff919f170dfee0b90653ac5fd727b7542f98ba1fb9bdbee84f6b9e |
|
MD5 | 24604005f3988d81a243dba1d8e56775 |
|
BLAKE2b-256 | d1fbb45eb1ad667ece3c5844d52ab7eccfeb824a35fe587645d63894460fbac5 |