Reference

Class

RiMarkov

Name

loadTokens

Description Loads an array of tokens (or words) into the model;
each element in the array must be a single token for proper construction of the model.
Syntax
loadTokens(tokens);
loadTokens(tokens, multiplier);
Parameters
String[]tokens the strings with which to load the model
intweighting for tokens in the array (optional, default=1)
Returns
RiMarkovthis RiMarkov
Example
sample = "One reason people lie is to achieve personal power.";
rm = new RiMarkov(3);
rm.loadTokens(tokens);
Platform Java / Javascript