Skip to main content

基于字典树的匹配

Project description

Chinese Desc

基于字典树的匹配

安装
  • pip install triedict
github demo
过程
  • 先初始化需要匹配的term,再进行匹配
    • term可以逐步增加
优点
  • 利用空间换取时间,效率高
  • term输入可以为一个tuple或list
    • 第一个元素为term本身,第二个元素为term的补充信息,可以为python的数据类型[str, tuple, dict, list, ...]
  • 返回位置索引
其他
  • 有任何想法请添加issues
  • 好用的话请给GitHub项目星星哦

English Desc

Trie Based Matching

install
  • pip install triedict
Github url:
Process
  • First initialize the terms to be matched, then matching.
    • term can step to add.
Advantages
  • Using space for time, High efficiency.
  • Input of term can be tuple or list
    • First element is term exactly, second is the supplementary information of the term
    • The type of the second can be str, tuple, dict, list, ... and so on.
  • return the index of the word
Other

Please add issues if you have any ideas. Please give the GitHub project stars if it works well!

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

triedict-1.1.1.tar.gz (7.1 kB view hashes)

Uploaded Source

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