Fuzzy matching for the use in gherkin based automated tests.
Project description
Veridica
This project was made for the use of fuzzy comparison algorithmic comparisons for the use in gherkin based test automation.
We found that it was required to have full control over the system to limit dependencies. However that does not mean that others cannot use the code that I have developed and will use.
Overview
Veridica provides a set of pure Python algorithms to compare strings reliably based on fixed math based algorithms.
It includes:
-
Classic string similarity metrics Classic string to string matching based on algorithms like levenstein.
-
One-to-many batch comparisons While one to one comparisons can give you a sence of what you are looking for, most usecases involve the comparion for one item to a set. Therefore an implementation was made using classic and recursive techniques that can be directly implemented.
-
Timing utilities for measuring comparison performance For now limited to a wrapper function that can give back the time it took to complete for compartive data.
Installation
You can install the package via PyPI or from source.
Install from PyPI
pip install veridica
Install from Source (GitHub)
git clone https://github.com/sebastiaanswanenberg/veridica.git
cd veridica
pip install .
Usage
After installation, you can use veridica to compare strings one to one or compare a string to a set.
Example: Comparing strings one-to-one.
from veridica.similarity import levenshtein
Example: Comparing string to a set of strings.
from veridica.similarity import levenshtein
from veridica.batch import compare_many
Example: Time your string to set calculations.
from veridica.similarity import levenshtein
from veridica.batch import compare_many
from veridica.timing import timed
Testing
This project includes a test suite. You can run tests using pytest:
pip install pytest
pytest tests
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues if you have any suggestions or find bugs.
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
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 veridica-0.1.0.tar.gz.
File metadata
- Download URL: veridica-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fabddb04ee2b81f563f5b8348f6e0d937aa7155197397dc162b758461371f76
|
|
| MD5 |
ae7660fdb1cd2c1c7cc39c5faedd6ff9
|
|
| BLAKE2b-256 |
a73e24030372d42049f3fdc4e2279537241f05ce33b484db642ac8045db2bea5
|
File details
Details for the file veridica-0.1.0-py3-none-any.whl.
File metadata
- Download URL: veridica-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c33cf0c3da1a9a63fc3d19e852cd3a43eb553d384fa57e48bd33d832ff4136cb
|
|
| MD5 |
f085a911dd96ab242ce401d32a19d664
|
|
| BLAKE2b-256 |
2dcc890710cc4f368e8e57f72ffb61cccca354304b05c031049acc07c972f4fb
|