Crates.io | gabble |
lib.rs | gabble |
version | 0.1.1 |
source | src |
created_at | 2021-09-02 12:31:21.78584 |
updated_at | 2021-09-02 12:55:57.309785 |
description | Library crate for generating random pseudo-words |
homepage | |
repository | https://github.com/trueleo/gabble/ |
max_upload_size | |
id | 445949 |
size | 12,927 |
use rand::{thread_rng, Rng};
let mut rng = thread_rng();
// `Gab` gives gibberish of some moderate length
use gabble::Gab;
let word: Gab = rng.gen();
println!("{} might be answer to life", word);
// `GabLength` gives gibberish of minimum N length
use gabble::GabLength;
let word: GabLength<14> = rng.gen();
println!("{} is a long word", word);
Top words
Words are generated by combining vowel-consonant syllables. If you want words that closely resembles regular english then look for some library that uses markov chain.