Marisa Trie – Static memory-efficient Trie-like structure
9 months ago
- #Python
- #Trie
- #Memory-efficient
- 基于marisa-trie C++库的Python(3.8+)静态内存高效类Trie结构
- MARISA-trie中的字符串数据占用的内存可能比标准Python字典少50-100倍
- 原始查找速度相当;trie还提供前缀搜索等快速高级方法
- 提供可pip安装的基于Cython的替代Python绑定方案
- 安装方式:python -m pip install -U marisa-trie
- 限制包括:未测试mingw32编译器、.prefixes()方法较慢、缺少.values()方法
- 封装代码采用MIT许可证;捆绑的marisa-trie C++库采用LGPL或BSD 2-clause双重许可