Crate markov_strings

Source
Expand description

A simplistic & configurable Markov chain text generator

Give it a vec of strings and generate random results. Works best with tweets, chat history, news headlines…

Minimal example:

use markov_strings::*;

let data: Vec<InputData> = vec![/* a lot of data */];
let mut markov = Markov::new();
markov.add_to_corpus(data);
let result: MarkovResult = markov.generate().unwrap();

Structs§

ImportExport
Struct used to import and export data.
InputData
The input struct to build the markov-strings corpus.
Markov
The Markov chain generator
MarkovResult
Struct holding the generator’s results.

Enums§

ErrorType
Struct for possible errors during the corpus building, or result generation.