[−][src]Crate warkov
Markov chain generator
Documenation
Look a head size
When generating a new term, it looks at the previous X items that it has already output to decide the next item. This number controls this.
Example
use warkov::MarkovChain; // Create a new generator let mut mc = MarkovChain::new(5); // Train it on some words mc.train("foo".chars()); mc.train("bar".chars()); mc.train("baz".chars()); // Generate a new word let new_word: Vec<char> = mc.generate();
Structs
MarkovChain | A Markov Chain. |
Traits
Rng | An automatically-implemented extension trait on |