Skip to main content

A library for string matching between two lists.

Project description

Installation

The library requries Python>=3.8 and to install the package simply run:

pip install levenshtein_matching

Why

Performing string matching between to lists is an $n\times m$ operation. Depending on your use case and the size of the lists you want to match this becomes unfeasible. This library exists to leverage Rust's performance to decrease run time for such operations.

Example

from levenshtein_matching import find_best_match_levenshtein

target = [("String 1", 1), ("String 2", 2)]
query = [("String 2", 0.8), ("String 1", 0.5)]
threshold = 0.9

target_values, query_values = find_best_match_levenshtein(target, query, threshold)
print(f"Target values: {target_values}")
print(f"Query values: {query_values}")

Output:

Target values: [2, 1]
Query values: [0.8, 0.5]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

levenshtein_matching-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl (335.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.34+ x86-64

File details

Details for the file levenshtein_matching-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for levenshtein_matching-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c673a955e57ca7aa944dac47bd338ea751362d33af8800a2d5f5539d811b501b
MD5 d8fa1dfb5d05d4f6f93cce1b769b3a62
BLAKE2b-256 f2c24a5654ae8d6b26c09594fee3932ef7c3eb8b4f275bdbf64b225f202b609e

See more details on using hashes here.

Supported by

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