PyyMatcher
Implementation of pattern matching in Python(using gestalt approach). This library implements the underlaying algorithm(longest_common_substring) with C++.
Installation
pip install pyymatcher
Usage example
>> from pyymatcher import PyyMatcher, get_close_matches
>>> obj = PyyMatcher('Word1', 'word1')
>>> obj.ratio()
0.8
>>> obj.ratio(case_insensitive=True)
1.0
>>> obj.longest_common_substr
'ord1'
>>> word = 'thiis'
>>> get_close_matches(word=word,
possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
n=1)
['this']
>>> get_close_matches(word=word,
possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
n=2,
case_insensitive=True)
['this', 'THIS']
Release History
- 0.0.1
- initial release
Support
Python 3.6+
Meta
Abdul Niyas P M – @AbdulNiyas19 – abdulniyaspm@gmail.com
Distributed under the MIT license. See LICENSE for more information.
Contributing
- Fork it (https://github.com/abdulniyaspm/pyymatcher/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Release files for pyymatcher 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyymatcher-0.0.5.tar.gz | 4.7 kB | Details |
Release files / pyymatcher-0.0.5.tar.gz
| Download URL | pyymatcher-0.0.5.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7216e9991f25ef7cc682ee6e352de78c010426a169f4240688714efd3dcee63
|
|
BLAKE2b-256 checksum How to use checksums |
03108f7b2ff9b721096d4fe82e2d3cdb3ef136df1384f51edd79cd03f74d21f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.2
|