4 ms·
Marisa-Trie – Matching Algorithm with Recursively Implemented Storage
- amelius 11y agoHow fast are (small) updates to the trie? (Does the trie need to be recomputed from scratch?)
- wfunction 11y agoGood call! Apparently it's a static, not dynamic, data structure. http://kmike.ru/python-data-structures/ http://kmike.ru/python-data-structures/
- madisonmay 11y agoSo in other words, O(n) where n is the number of elements in the trie? That's rough.
- madisonmay 11y agoI've used this thing to reduce the size of scikit-learn's TfidfVectorizer, which stores a giant dictionary of words --> occurrence counts, and have seen close to 10X memory reductions. Great project!
- rurban 11y agoI updated it here: https://github.com/rurban/marisa-trie https://github.com/rurban/marisa-trie with the original wiki docs and some fixes for latest toolchains