Reference

Class

RiMarkov

Name

loadText

Description Loads a text string into the model after tokenizing it.
Syntax
loadText(text);
loadText(text, multiplier);
loadText(text, multiplier, regex);
Parameters
Stringthe string to load
intweighting for text (optional, default=1)
Stringa regular expression to be used for tokenizing (optional, if not supplied, uses RiTa.tokenize())
Returns
RiMarkovthis RiMarkov
Example
sample = "One reason people lie is to achieve personal power.";
rm = new RiMarkov(3);
rm.loadText(sample);
Platform Java / Javascript