Skip to content

kotx/march

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

March

A Markov chain crate for Rust. This implementation should work for any item that implements Hash + Eq + Clone.

Usage

use march::Chain;

fn main() {
    let mut chain = Chain::new();
    let sentence = "The quick brown fox jumped over the lazy dog".to_lowercase();
    let mut words = sentence.split_whitespace().into_iter();
    chain.feed(&mut words);

    let sentence = chain.generate();
    dbg!(sentence);
}

See examples for more usages.

About

Markov chain implementation in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages