marukov

Crates.iomarukov
lib.rsmarukov
version0.0.1
created_at2025-09-18 21:38:08.568689+00
updated_at2025-09-18 21:38:08.568689+00
descriptiona simple markov chain text generator
homepagehttps://github.com/xjunko/marukov
repositoryhttps://github.com/xjunko/marukov
max_upload_size
id1845443
size17,677
Junko (xjunko)

documentation

README

marukov

a dead simple markov text generation library.

usage

use marukov::{Text, TextOptions};

// load your data from somewhere
// each new line in your data is a new entry.
let lyrics = std::fs::read_to_string("weathergirl.txt").unwrap();

// create the text model
let text = Text::new(lyrics);

// start generating stuff
for _ in 0..5 {
    println!("{}", text.generate(TextOptions::default()))
}

outputs example

ability so specific it sounds so stupid
asriel dreemurr from touhou 93
banished back to middle east

completely new sentence btw, you just have to give it a lot of data.

Commit count: 5

cargo fmt