1 unstable release

Uses old Rust 2015

0.1.0 Sep 22, 2020

#34 in #markov-chain


Used in warkov-wordgen

AGPL-3.0+

12KB
241 lines

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();

Dependencies

~400KB