From f8ff8949fda2a4d6eaffae8c1235ec09a6e7482c Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 28 Jul 2017 14:51:36 +0200 Subject: [PATCH 1/3] readme: add changelog for 0.3.0 --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 7adbce0..b3d7e32 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,27 @@ lorem ipsum text is derived from part of that book. ## Release History +### 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: + +* `new_with_rng` makes it possible to specify the random number + generator used by the Markov chain. Use this to get deterministic + and thus reproducible output for tests. `MarkovChain` now owns the + RNG it uses and as a consequence, it has an extra type parameter. + This is a breaking change if you used struct directly in your code. + +* `iter` and `into_from` return iterators over words in the Markov + chain. The `generate` and `generate_from` methods are now + straight-forward convenience wrappers for the iterators. + +* `len` tells you the number of stats in the Markov chain and + `is_empty` tells you if the Markov chain is empty, meaning that it + hasn't been trained on anything yet. + ### Version 0.2.0 — July 10th, 2017 Rust version 1.6.0 is now supported. This is checked with TravisCI. From 2fde83bc27a92368cba87e64d8c3259ac21fd0ff Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 28 Jul 2017 15:01:36 +0200 Subject: [PATCH 2/3] cargo: expand crate description a little --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 8c1a232..8bb3c01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Martin Geisler "] description = """ Lipsum is a lorem ipsum text generation library. Use this if you need some filler text for your application. + +The text is generated using a simple Markov chain, which you can also +instantiate to generate your own pieces of pseudo-random text. """ documentation = "https://docs.rs/lipsum/" repository = "https://github.com/mgeisler/lipsum/" From e1dfece1d5436236ede68d98102149475ac79c50 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 28 Jul 2017 15:01:56 +0200 Subject: [PATCH 3/3] cargo: bump version to 0.3.0 --- Cargo.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8bb3c01..bf52a04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lipsum" -version = "0.2.0" +version = "0.3.0" authors = ["Martin Geisler "] description = """ Lipsum is a lorem ipsum text generation library. Use this if you need diff --git a/README.md b/README.md index b3d7e32..db02a62 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ application. Add this to your `Cargo.toml`: ```toml [dependencies] -lipsum = "0.2" +lipsum = "0.3" ``` and this to your crate root: