Just in case it helps:
No idea how it stacks up to what this thread shows, but I put together a POC for a trie implementation a while ago. I think they are supposed to be really fast AFAIK.
clone and description:
@adhamfaisal
Okay, I think I have it here.
This clone does the following:
allows you to build a trie from a list of strings (see the build_trie function)
saves the trie in a DataTable as JSON (and returns it as a dictionary)
autocomplete search terms using the precomputed trie (see Module1)
I did not use the code above exactly, but mine is similar (e.g., there are no classes).
You will have to find a way of getting your large list of words into the build_trie function. However, that should…
If you are in need of speed it might help.
1 Like