Skip to main content

Multi-Pattern Matching Algorithms 多模式匹配算法

Project description

Engling Example:

from multi_pattern_search import MultiPatternSearch

search = MultiPatternSearch() search.add_keyword(“zsp”) search.add_keyword(“my”)

print search.exist(“sdfgasg sadgfa zsp my “)

for k, v in search.count(“my zsp ewtawt my zsp wat233”).iteritems():

print k.decode(‘utf-8’), v

中文演示:

#coding=utf-8

from multi_pattern_search import MultiPatternSearch

search = MultiPatternSearch() search.add_keyword(“张沈鹏”) search.add_keyword(“我是”)

print search.exist(“asdga sddqbq 珍珠饰张沈鹏品 “)

for k, v in search.count(“我是张沈鹏.我是张沈鹏.我是张沈鹏.我是张沈鹏.”).iteritems():

print k.decode(‘utf-8’), v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multi_pattern_search-1.2.3.tar.gz (20.2 kB view details)

Uploaded Source

File details

Details for the file multi_pattern_search-1.2.3.tar.gz.

File metadata

File hashes

Hashes for multi_pattern_search-1.2.3.tar.gz
Algorithm Hash digest
SHA256 c206c76e0d03a8374aa4f22e07bdf9b958ed27d23872930e4211f05040193688
MD5 21c2f92afe100d57a03f353c7ebb5a66
BLAKE2b-256 e6790f881e7adbc1c9a0e46d3ebe89c3d940eb6fff02b29f47c04b24a4e0d537

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page