How to create a trie in Python

后端 未结 12 1497
别那么骄傲
别那么骄傲 2020-11-22 12:39

I\'m interested in tries and DAWGs (direct acyclic word graph) and I\'ve been reading a lot about them but I don\'t understand what should the output trie or DAWG file look

12条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 13:15

    Here is a list of python packages that implement Trie:

    • marisa-trie - a C++ based implementation.
    • python-trie - a simple pure python implementation.
    • PyTrie - a more advanced pure python implementation.
    • pygtrie - a pure python implementation by Google.
    • datrie - a double array trie implementation based on libdatrie.

提交回复
热议问题