快速,纯C-Trie
pyctrie的Python项目详细描述
Pyctrie
======
快速、纯C[trie](http://en.wikipedia.org/wiki/trie)字典
功能:
========
*非常快速。与python的**dict**性能特性相同。
*支持快速**后缀**、**前缀**、**更正**(拼写)操作。
*支持python 2.6<;=x<;= 3.4
Example:
===================
It is just like a dict:
```python
import triez
tr = triez.Trie()
tr[u"foo"] = 1
del trie[u"foo"]
```
But with extra features:
```python
tr[u"foo"] = 1
tr.corrections(u"fo")
{'foo'}
tr[u"foobar"] = 1
tr.prefixes(u"foobar")
{'foo', 'foobar'}
tr.suffix(u“foo”foo)
{'foo','foobar'}
```
发电机支持:
``python
tr[u“foo”]=1
tr[u“foobobar”]=1
x in tr.iter_后缀后缀(u“foo”foo)
print(x)
foo
>foobar
````
许可证
===
mit
======
快速、纯C[trie](http://en.wikipedia.org/wiki/trie)字典
功能:
========
*非常快速。与python的**dict**性能特性相同。
*支持快速**后缀**、**前缀**、**更正**(拼写)操作。
*支持python 2.6<;=x<;= 3.4
Example:
===================
It is just like a dict:
```python
import triez
tr = triez.Trie()
tr[u"foo"] = 1
del trie[u"foo"]
```
But with extra features:
```python
tr[u"foo"] = 1
tr.corrections(u"fo")
{'foo'}
tr[u"foobar"] = 1
tr.prefixes(u"foobar")
{'foo', 'foobar'}
tr.suffix(u“foo”foo)
{'foo','foobar'}
```
发电机支持:
``python
tr[u“foo”]=1
tr[u“foobobar”]=1
x in tr.iter_后缀后缀(u“foo”foo)
print(x)
foo
>foobar
````
许可证
===
mit