diff --git a/JavaTriesWithFrequencies.m b/JavaTriesWithFrequencies.m index 4411f847..4a0dfc68 100644 --- a/JavaTriesWithFrequencies.m +++ b/JavaTriesWithFrequencies.m @@ -70,16 +70,13 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc. Here is the Mathematica code for Step 2: + AppendTo[$Path, "/Users/antonov/MathFiles/MathematicaForPrediction"]; + Needs["JavaTriesWithFrequencies`"] + $JavaTriesWithFrequenciesPath = "/Users/antonov/MathFiles/MathematicaForPrediction/Java/TriesWithFrequencies"; - Needs["JLink`"]; - AddToClassPath[$JavaTriesWithFrequenciesPath]; - ReinstallJava[JVMArguments -> "-Xmx2g"]; - LoadJavaClass["java.util.Collections"]; - LoadJavaClass["java.util.Arrays"]; - LoadJavaClass["Trie"]; - LoadJavaClass["TrieFunctions"]; + JavaTrieInstall[$JavaTriesWithFrequenciesPath] Several examples of building tries and operations over them follow. @@ -109,6 +106,10 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc. "children" -> {}}, {"value" -> 1., "key" -> "ers", "children" -> {}}}}}}}}}}}}}} *) + For more usage examples see the corresponding unit tests file: + + https://github.com/antononcube/MathematicaForPrediction/blob/master/UnitTests/JavaTriesWithFrequencies-Unit-Tests.wlt + Anton Antonov Windermere, FL January 2017