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

Uploaded Source

File details

Details for the file triedict-1.1.1.tar.gz.

File metadata

  • Download URL: triedict-1.1.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8

File hashes

Hashes for triedict-1.1.1.tar.gz
Algorithm Hash digest
SHA256 e8ad575a3cd6d4ec59f54b784b95b5984993e04c69f81343bd8d38fac38526d8
MD5 9318d71120c6b130fe17c376d47ed468
BLAKE2b-256 2552c57310d526f44fa19cd18aa10ad18575582fe519ff29847b90e765ce108c

See more details on using hashes here.

Supported by

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