slimpy
A simple library that provides custom string slicing and matching.
slimpy provides a convenient solution for searching and identifying strings that may have unexpected characters. It is useful for searching and identifying an expected string but has mismatched characters, for example, strings extracted from OCR tools like pytesseract. In fact, that is the reason behind the creation of this library.
For example, suppose there is a script that extracts text from an image and there is an expected word to be present in the extracted text:
expected_word = "character"
extracted_text = "This sentence has one typo word that has two mismatch oharaoter"
expected_word in extracted_text
>>> False
# We can use this library to tackle this kind of occasion
from slimpy import Fragment, REM
word_Fragment = Fragment(expected_word)
matching = REM()
matching.set_reference(extracted_text)
match = matching.perform_matching(word_Fragment)
match
>>>
Fragmented string: character
Pattern match : .{0,1}hara.*?ter
List of match : ['oharaoter']
match.match
>>> oharaoter
match.pattern
>>> .{0,1}hara.*?ter
That's it! As mentioned earlier, searching and identifying strings that may have unexpected characters. For more information, visit the GitHub page.
Metadata
Release files for slimpy 0.1.0
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 |
|---|---|---|---|---|
| slimpy-0.1.0.tar.gz | 9.6 kB | Without provenance | Details for slimpy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slimpy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for slimpy-0.1.0-py3-none-any.whl |
Total release size: 17.1 kB
Release files / slimpy-0.1.0.tar.gz
| Download URL | slimpy-0.1.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72ae4847ef2f9781bc64e4a45627fc7dcbd367702d3606df2266acaff0e059fa
|
|
BLAKE2b-256 checksum How to use checksums |
781af366c6c0ca64359dc6bdd3efea3158d55cf3a69fb7853bf04007c7702668
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / slimpy-0.1.0-py3-none-any.whl
| Download URL | slimpy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73f9222c345a9c5657c6b2ef956f6c54721e95e5b937a783d1ea87cbc6e030ef
|
|
BLAKE2b-256 checksum How to use checksums |
bd53ca9bce09cbad28759b3ee7777ca31a349db9f52ccb16f95a040e8824db42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for slimpy 0.1.0
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.