Reference

Class

RiMarkov

Name

addText

Description Loads text into the model. If a raw string is provided, it will be split into sentences (using RiTa.sentences(). If an array is provided, each string is treated as an individual sentence.
Example
sample = "One reason people lie is to achieve personal power.";
rm = new RiMarkov(3);
rm.addText(sample);
OR
rm.addText(sentencesArray);
Parameters
String or String[]an array of sentences or the raw text to be split into sentences
intweighting for text (optional, default=1)
Returns
RiMarkovthis RiMarkov
Syntax
addText(text);
addText(text, multiplier);
Platform Java / JavaScript