Lorem Ipsum

Lipsum is a small Rust library for generating pseudo-Latin lorem ipsum filler text. This is a standard placeholder text used in publishing. It starts with:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat…

The text is generated using a [Markov chain] that has been trained on the first book in Cicero's work De finibus bonorum et malorum (On the ends of good and evil), of which the lorem ipsum text is a scrambled subset.

Usage

Add this to your Cargo.toml: toml [dependencies] lipsum = "0.4"

and this to your crate root: rust extern crate lipsum;

Documentation

Please see the API documentation.

Getting Started

Use the lipsum function to generate lorem ipsum text: ```rust extern crate lipsum;

use lipsum::lipsum;

fn main() { // Print 25 random words of lorem ipsum text. println!("{}", lipsum(25)); } ```

This generates the lorem ipsum text show above:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco…

The text becomes random after 18 words, so you might not see exactly the same text.

Release History

This is a changelog with the most important changes in each release.

Version 0.4.0 — September 24th, 2017

The generate and generate_from now always generate proper sentences, meaning that they generate sentences that start with a capital letter and end with . or some other punctuation character. Use iter and iter_from directly if you need more control.

Version 0.3.0 — July 28th, 2017

Performance is improved by about 50% when generating text, but training the Markov chain now takes about twice as long as before.

The MarkovChain struct has many new methods:

Version 0.2.0 — July 10th, 2017

Rust version 1.6.0 is now supported. This is checked with TravisCI.

Version 0.1.0 — July 2nd, 2017

First public release.

License

Lipsum can be distributed according to the MIT license. Contributions will be accepted under the same license.