Skip to main content

PyyMatcher

License Version Python versions Code style: black

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 – @AbdulNiyas19abdulniyaspm@gmail.com

Distributed under the MIT license. See LICENSE for more information.

Github Profile

Contributing

  1. Fork it (https://github.com/abdulniyaspm/pyymatcher/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. 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)

Source distribution for pyymatcher 0.0.5
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

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page