Skip to main content

Library providing functions to calculate Levenshtein distance, Optimal String Alignment distance, and Damerau-Levenshtein distance, where the cost of each operation can be weighted by letter.

Project description

Codebase forked from https://github.com/infoscout/weighted-levenshtein

Install

pip3 install weighted-levenshtein-substring

Usage

Use

from weighted_levenshtein import mod_lev

distance: float = mod_lev(string, pattern)

To find the lowest edit distance between pattern and any substring of string.

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

weighted_levenshtein-substring-0.0.3.tar.gz (135.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weighted_levenshtein_substring-0.0.3-cp37-cp37m-macosx_10_9_x86_64.whl (89.1 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file weighted_levenshtein-substring-0.0.3.tar.gz.

File metadata

File hashes

Hashes for weighted_levenshtein-substring-0.0.3.tar.gz
Algorithm Hash digest
SHA256 84c9507bafe150e3d0823833ee8a222f6e8ecdcfb663e6cdc6345130b0ab10d1
MD5 f72feb3ac057b28d5f4a74fc97786f6a
BLAKE2b-256 e27eb4bd05fcdc25434dab380c01111aff49bedfaac7a30bfbc19580deb7ae0a

See more details on using hashes here.

File details

Details for the file weighted_levenshtein_substring-0.0.3-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for weighted_levenshtein_substring-0.0.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 03f3114d60e823971e70e88d6ad9e1fccc814deb49386c9b6f27068c94c4add9
MD5 4672b089c43ba297cf8ede58e061c4cf
BLAKE2b-256 663699375aec96a786d81acc85a3435fa161212133af1f20d693a1125e325cb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page