Reference

Class

RiMarkov

Name

generateUntil

Description Continues generating tokens until a token matches 'regex', assuming the length of the output array is between min and maxLength (inclusive).
Syntax
generateUntil(regex, minLength, maxLength);
Parameters
Stringthe regular expression (regex) to match
intthe minimum number of tokens to generate
intthe maximum number of tokens to generate
Returns
String arraythe result
Example
rm.loadFrom("http://www.rednoise.org/rita/examples/data/wittgenstein.txt");
output = rm.generateUntil("the");
Platform Java / Javascript