pytries / marisa-trie

Static memory-efficient Trie-like structures for Python based on marisa-trie C++ library.
https://marisa-trie.readthedocs.io/en/latest/
MIT License
1.02k stars 91 forks source link

Single character prefixes returning null prefix matches #55

Open dkoslicki opened 4 years ago

dkoslicki commented 4 years ago

For example, I have a trie with:

>>>list(tree.iterkeys("GC"))
['GCGx0x0']

and yet:

>>>list(tree.iterkeys("G"))
[]

G is certainly a prefix of GCGx0x0, so shouldn't it return the same results in both cases?

Ps7ch3 commented 1 week ago

Same question here. Any update?