about summary refs log tree commit diff stats
path: root/kgramstats.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-02-14 00:08:08 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-02-14 00:08:08 -0500
commit1971f4936b53bc05765b88a2c76e675a18555237 (patch)
treee357f39d9f834bf9baa716302c80c10918b80320 /kgramstats.cpp
parentcee456c24755604e8503038bad5ce653d8065281 (diff)
downloadrawr-ebooks-1971f4936b53bc05765b88a2c76e675a18555237.tar.gz
rawr-ebooks-1971f4936b53bc05765b88a2c76e675a18555237.tar.bz2
rawr-ebooks-1971f4936b53bc05765b88a2c76e675a18555237.zip
Tweaked kgram cut rate again
Diffstat (limited to 'kgramstats.cpp')
-rw-r--r--kgramstats.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kgramstats.cpp b/kgramstats.cpp index a5402a3..f78336e 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp
@@ -426,9 +426,9 @@ std::string kgramstats::randomSentence(int n)
426 { 426 {
427 if (rand() % (maxK - cur.size() + 1) == 0) 427 if (rand() % (maxK - cur.size() + 1) == 0)
428 { 428 {
429 while ((cur.size() > 2) && (cuts > 0)) 429 while ((cur.size() > 1) && (cuts > 0))
430 { 430 {
431 if ((rand() % cuts) > 2) 431 if ((rand() % cuts) > (maxK - cur.size() + 1))
432 { 432 {
433 cur.pop_front(); 433 cur.pop_front();
434 cuts--; 434 cuts--;