From 884f80e0fbc1209657f29901e0c1b9f18738cf46 Mon Sep 17 00:00:00 2001 From: Anton Antonov Date: Sat, 28 Jan 2017 22:09:44 -0500 Subject: [PATCH] Added defition for shrinking with a specified threshold. --- JavaTriesWithFrequencies.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/JavaTriesWithFrequencies.m b/JavaTriesWithFrequencies.m index a61ac81b..6deb6744 100644 --- a/JavaTriesWithFrequencies.m +++ b/JavaTriesWithFrequencies.m @@ -252,6 +252,8 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc. Clear[JavaTrieShrink] JavaTrieShrink[jTr_?JavaObjectQ, sep_String: ""] := TrieFunctions`shrink[jTr, sep]; +JavaTrieShrink[jTr_?JavaObjectQ, sep_String, th_?NumberQ ] := TrieFunctions`shrinkByThreshold[jTr, sep, th]; + Clear[JavaTrieToJSON] JavaTrieToJSON[jTr_?JavaObjectQ] := ImportString[jTr@toJSON[], "JSON"];