Implementation of some pattern matching algorithms
Project description
PATTMATCH
Documentation
Example
>>> from pattmatch import *
>>>
>>> kmp('ABCABC', 'ABC')
[[0, 3], [3, 6]]
>>> rabin_karb('ABCDAABC', 'ABC')
[[0, 3], [5, 8]]
>>> boyer_moore('AAABAAACAAD', 'AA')
[[0, 2], [1, 3], [4, 6], [5, 7], [8, 10]]
>>> z_array('ABCDAABBCAAAABBCAAAAABCA', 'AAAA')
[1, 0, 0, 0, 2, 1, 0, 0, 0, 4, 3, 2, 1, 0, 0, 0, 4, 4, 3, 2, 1, 0, 0, 1]
LICENCE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pattmatch-0.0.2.tar.gz
(3.5 kB
view details)
File details
Details for the file pattmatch-0.0.2.tar.gz.
File metadata
- Download URL: pattmatch-0.0.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
526c61b90b687b3d3015e902a5ac7e4f110788fccfc5b9876a354463f79e0a59
|
|
| MD5 |
bbfb8e630b16790fdd532bb649e3f160
|
|
| BLAKE2b-256 |
989d72fcab0d9a7e0e2f0882257356ea3958a8646998360f809f0c84b188c416
|