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
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
File details
Details for the file multi_pattern_search-1.2.1dev-r24558.tar.gz
.
File metadata
- Download URL: multi_pattern_search-1.2.1dev-r24558.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ecd9fad78b0331587c82a2ddbef7907cea5adddb41a03999a549923522e8509 |
|
MD5 | 233d1b317987f9971dbc4f60a71cec67 |
|
BLAKE2b-256 | fa80d63cff3da213912f70225d68f6174a98cfdaf761e2b05a468995d83fa7fd |