diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-28 20:12:45 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-28 20:12:45 -0500 |
| commit | 01fcbeb60da0bff33d5d9f5b870d444cc418a01d (patch) | |
| tree | e506e532c02d08505d4328df37f4fac8c816e89f /kgramstats.h | |
| parent | 1890eb5d4a496aea5e9114550081ca63bd280f3b (diff) | |
| download | rawr-ebooks-01fcbeb60da0bff33d5d9f5b870d444cc418a01d.tar.gz rawr-ebooks-01fcbeb60da0bff33d5d9f5b870d444cc418a01d.tar.bz2 rawr-ebooks-01fcbeb60da0bff33d5d9f5b870d444cc418a01d.zip | |
Converted to C++ style randomization
The logic in rawr::randomSentence with the cuts might be slightly different now but who even knows what's going on there.
Diffstat (limited to 'kgramstats.h')
| -rw-r--r-- | kgramstats.h | 3 |
1 files changed, 2 insertions, 1 deletions
| diff --git a/kgramstats.h b/kgramstats.h index 49fe04e..848af24 100644 --- a/kgramstats.h +++ b/kgramstats.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "identifier.h" | 9 | #include "identifier.h" |
| 10 | #include <functional> | 10 | #include <functional> |
| 11 | #include <set> | 11 | #include <set> |
| 12 | #include <random> | ||
| 12 | 13 | ||
| 13 | class rawr { | 14 | class rawr { |
| 14 | public: | 15 | public: |
| @@ -19,7 +20,7 @@ class rawr { | |||
| 19 | 20 | ||
| 20 | void setTransformCallback(transform_callback _arg); | 21 | void setTransformCallback(transform_callback _arg); |
| 21 | void setMinCorpora(int _arg); | 22 | void setMinCorpora(int _arg); |
| 22 | std::string randomSentence(int maxL) const; | 23 | std::string randomSentence(int maxL, std::mt19937& rng) const; |
| 23 | 24 | ||
| 24 | private: | 25 | private: |
| 25 | struct terminator { | 26 | struct terminator { |
