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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file levenshtein_matching-0.5.2.tar.gz.
File metadata
- Download URL: levenshtein_matching-0.5.2.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39794023760632ef8f8fef97d5ec6c11de05b56e16c4cb26627c9d4a52826136
|
|
| MD5 |
fd7860f93335bf2b9865b7274862bf5b
|
|
| BLAKE2b-256 |
fcc448842c87609b9715218fb304b44d564ba10541b64a7cb36bd704c5560a0e
|
File details
Details for the file levenshtein_matching-0.5.2-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: levenshtein_matching-0.5.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 248.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb9cd20a81d41a3fffc484cb4ac31d341b2bf4ad7cb994f618ad5c3af7ad462a
|
|
| MD5 |
508d4c08ba83f8744fc38b93000341f3
|
|
| BLAKE2b-256 |
327c614cb3bfe5c6994f9b102a97c6b16bbebe8b0f453e5988dfc095998550ec
|