Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
WL interface to Tries with frequencies implemented in Java
Contributed by: Anton Antonov
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["AntonAntonov/JavaTriesWithFrequencies"]
To load the code after installation, evaluate this code:
Needs["AntonAntonov`JavaTriesWithFrequencies`"]
Assign Java JAR file name and check existence:
In[1]:= | ![]() |
Out[2]= | ![]() |
Install (connect) to Java's implementation:
In[3]:= | ![]() |
Here is a list of words:
In[4]:= | ![]() |
Make a Java trie:
In[5]:= | ![]() |
Out[5]= | ![]() |
Visualize the trie:
In[6]:= | ![]() |
Out[6]= | ![]() |
Conversion of the Java object to JSON and importing that in the WL session:
In[7]:= | ![]() |
Out[7]= | ![]() |
Classification:
In[8]:= | ![]() |
Out[8]= | ![]() |
Random choice:
In[9]:= | ![]() |
Out[9]= | ![]() |