Reference

Class

RiMarkov

Name

getProbabilities

Description Returns the full set of possible next tokens as a map, given an array of tokens representing the path down the tree (with length less than n).
 
Note: seed arrays of any size (>0) may be input, but only the last n-1 elements will be considered.
Syntax
getProbabilities(pathString);
getProbabilities(pathArray);
Parameters
String OR String[]a single token or array of tokens (strings)
Returns
Mapassociative array (JS) or HashMap (Java) mapping tokens to probabilities
Example
rm = new RiMarkov(3); 
rm.loadFrom("http://www.rednoise.org/rita/examples/data/wittgenstein.txt");
rm.getProbabilities(new String[]{"be","thought"});
Platform Java / Javascript