Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Functions for creation and manipulation of tries (prefix trees) with frequencies
Contributed by: Anton Antonov
Functions for creation and manipulation of tries (prefix trees) with frequencies. Suitable for (sequential) data analysis and mining.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["AntonAntonov/TriesWithFrequencies"]
Here we create a trie from a list of words, and plot it:
In[1]:= |
Out[2]= |
Here we convert the frequencies of the trie above into probabilities, shrink the obtained trie, and then plot it:
In[3]:= |
Out[4]= |
Given the trie above and the string "ca" here we find which letters the string is most like to finish with:
In[5]:= |
Out[5]= |