Markov-strings
A simplistic, configurable, Markov chain text generator. Give it an array of strings, and it will output a randomly generated string.
This is a port of the npm library markov-strings, from the same author.
Usage
use *;
// Instantiate the generator
let mut markov = new;
// Optional: specify a state size
markov.set_state_size; // Default: 2
// Feed it data
let data: = vec!;
markov.add_to_corpus;
// Define a results filter
markov
.set_filter
.set_max_tries;
let result: MarkovResult = markov.generate.unwrap;
Repository
The code is hosted on this Fossil repository.
To clone this project, install Fossil SCM, then:
$ mkdir markov_strings
$ cd markov_strings
$ fossil clone https://fossil.scambier.xyz/markovStringsRust markov_strings.fossil
$ fossil open markov_strings.fossil