slimpy


Nameslimpy JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryCustom String Slicing and Matching in Python
upload_time2023-05-27 09:04:45
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT License Copyright (c) 2023 Jibril Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords matching mismatch slicing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```python
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](https://github.com/max-efort/slimpy).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "slimpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "matching,mismatch,slicing",
    "author": "",
    "author_email": "Jibril <erikfortran@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/78/1a/f366c6c0ca64359dc6bdd3efea3158d55cf3a69fb7853bf04007c7702668/slimpy-0.1.0.tar.gz",
    "platform": null,
    "description": "# slimpy\nA simple library that provides custom string slicing and matching.\n\nslimpy provides a convenient solution for searching and identifying strings\nthat may have unexpected characters. It is useful for searching and identifying \nan expected string but has mismatched characters, for example, strings \nextracted from OCR tools like pytesseract. In fact, that is the reason behind \nthe creation of this library.\n\nFor example, suppose there is a script that extracts text from an image \nand there is an expected word to be present in the extracted text:\n\n```python\nexpected_word = \"character\"\nextracted_text = \"This sentence has one typo word that has two mismatch oharaoter\"\nexpected_word in extracted_text\n>>> False\n\n# We can use this library to tackle this kind of occasion\nfrom slimpy import Fragment, REM\n\nword_Fragment = Fragment(expected_word)\nmatching = REM()\nmatching.set_reference(extracted_text)\nmatch = matching.perform_matching(word_Fragment)\nmatch\n>>> \nFragmented string: character\nPattern match    : .{0,1}hara.*?ter\nList of match    : ['oharaoter']\n\nmatch.match\n>>> oharaoter\nmatch.pattern\n>>> .{0,1}hara.*?ter\n```\n\nThat's it! As mentioned earlier, searching and identifying strings that may \nhave unexpected characters. \nFor more information, visit the GitHub [page](https://github.com/max-efort/slimpy).\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Jibril  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Custom String Slicing and Matching in Python",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/max-efort/slimpy"
    },
    "split_keywords": [
        "matching",
        "mismatch",
        "slicing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd53ca9bce09cbad28759b3ee7777ca31a349db9f52ccb16f95a040e8824db42",
                "md5": "d112b4a48708d579a4e05422c0ac4c8d",
                "sha256": "73f9222c345a9c5657c6b2ef956f6c54721e95e5b937a783d1ea87cbc6e030ef"
            },
            "downloads": -1,
            "filename": "slimpy-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d112b4a48708d579a4e05422c0ac4c8d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7566,
            "upload_time": "2023-05-27T09:04:43",
            "upload_time_iso_8601": "2023-05-27T09:04:43.401459Z",
            "url": "https://files.pythonhosted.org/packages/bd/53/ca9bce09cbad28759b3ee7777ca31a349db9f52ccb16f95a040e8824db42/slimpy-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "781af366c6c0ca64359dc6bdd3efea3158d55cf3a69fb7853bf04007c7702668",
                "md5": "5f0375323e1c2e5b2c1b9739a53870cd",
                "sha256": "72ae4847ef2f9781bc64e4a45627fc7dcbd367702d3606df2266acaff0e059fa"
            },
            "downloads": -1,
            "filename": "slimpy-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5f0375323e1c2e5b2c1b9739a53870cd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9565,
            "upload_time": "2023-05-27T09:04:45",
            "upload_time_iso_8601": "2023-05-27T09:04:45.742797Z",
            "url": "https://files.pythonhosted.org/packages/78/1a/f366c6c0ca64359dc6bdd3efea3158d55cf3a69fb7853bf04007c7702668/slimpy-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-27 09:04:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "max-efort",
    "github_project": "slimpy",
    "github_not_found": true,
    "lcname": "slimpy"
}
        
Elapsed time: 0.07235s