MatchFinder
A Python package that finds your string's soulmates- quickly, effortlessly, and with style.
Welcome to MatchFinder! It's your go-to tool for finding similar strings in a list. Whether you're matching names, fixing typos, or building a search engine, MatchFinder makes it easy no extra libraries needed, just simple and powerful Python!
Developed primarily for fun and learning purposes.
Why MatchFinder?
1. Simple: No unnecessary imports and install - just good old Python.
2. Customizable: Choose your output style - csv, JSON or text, with or without scores.
3. Speed: Optimized to return results quickly, even for large datasets.
4. Fun: Because boring tools are for boring developers.
Installation
You can install MatchFinder directly from PyPI:
pip install MatchFinder
Usage
Here's how to get started with MatchFinder:
Import the package
from MatchFinder import get_similar
Example 1: Text Output
input_str = "Snake" # Not exactly your ex, but close enough?
match_list = ["sneaky", "snake", "Snakeskin", "Slither", "your ex", "anaconda"]
n= 3
matches = get_similar(input_str, match_list, n,output_format="text")
print(matches)
output
['Match: snake', 'Match: sneaky', 'Match: Snakeskin']
Example 2: JSON Output
# Get similar strings in JSON format, including similarity scores
result = get_similar(input_str, match_list, n=2, include_score=True, output_format="json")
print(result)
output
[
{'match': 'snakes', 'score': 0.83},
{'match': 'snack', 'score': 0.6}
]
Example 3: Customizing Parameters
You can customize the Parameters
n - Maximum number of matches to return.(default 1)
output_format - Desired output format ("text" or "json" or "csv")
include_score - Whether to include similarity scores.
case_insensitive - Ignores case sensitivity of input text and match_list
# Change the number of matches and disable scores
result = get_similar("Python", ["Pithon", "Phyton", "Ruby", "Pytan"], n=2, include_score=False, output_format="text")
print(result)
output
['Match: Pithon', 'Match: Phyton']
Behind the Scenes
MatchFinder uses a custom similarity algorithm to calculate how "close" two strings are.
It's like Tinder for strings but with way less drama.
Contributions
Feel free to fork this project, add cool new features, or just drop by to say hi!
License
This project is licensed under the MIT License.
Get Matching Now!
Install MatchFinder today and make your strings feel a little less lonely.
Metadata
Release files for MatchFinder 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| MatchFinder-1.0.3.tar.gz | 4.0 kB | Without provenance | Details for MatchFinder-1.0.3.tar.gz |
Release files / MatchFinder-1.0.3.tar.gz
| Download URL | MatchFinder-1.0.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0988a52a06c5adced362b0e86ffc523fb3ef969719a550edd34f2eba5945b39
|
|
BLAKE2b-256 checksum How to use checksums |
2c4174af534d6ef6112833770ab9a5d6b98cab0071ee751b21cc19b4b029e8bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.11
|
Security for MatchFinder 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.