Open avnerbarr opened 2 years ago
I have a similar issue. I would like to run an algorithm based on the common prefix, but as far as I have been able to read the documentation, the common prefix is not able to be accessed, only the nibble vec that represents it.
@avnerbarr @Drvanon I also faced the same issue, in case that might be useful to the next person searching: I reused and improved an existing implementation for a generic trie without any dependencies. I added functions to easily find prefixes or postfixes in the trie and packaged it there: https://github.com/vemonet/ptrie
Hi,
I'm a bit confused as to how this is supposed to be used.
My example is as follows:
I have many entries (sentences/paragraphs etc.)
given an arbitrary prefix, I would like to retrieve all relevant matches from the trie.
For example:
Trie construction by these phrases
If I understand correctly the trie would compress along these lines
Now given a partial phrase such as:
Hello I
I would like to be able to retrieve the results for 1,2,3 (since they share the prefix
Hello I
)Can you point me in how to achieve this?
Thanks!