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 hashes)