Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Apr 7, 2018
1 parent b12d690 commit 0d825d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion JavaTriesWithFrequencies.m
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc.
Take[JavaTrieClassify[tr, record, "Probabilities", opts], UpTo[n]];

JavaTrieClassify[tr_, record_, "Probabilities", opts : OptionsPattern[]] :=
Block[{res, dval = OptionValue[TrieClassify, "Default"]},
Block[{res, dval = OptionValue[JavaTrieClassify, "Default"]},
res = JavaTrieLeafProbabilities[JavaTrieRetrieve[tr, record]];
If[Length[res] == 0, <|dval -> 0|>,
res = AssociationThread[res[[All, 2, 2]] -> res[[All, 1, 2]]];
Expand Down

0 comments on commit 0d825d0

Please sign in to comment.