From 294fe00911c6ee0dd9853df7612dcdbd63425c05 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 22 Nov 2015 16:25:12 -0500 Subject: I may have made things better. I may have made things worse. --- kgramstats.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kgramstats.cpp') diff --git a/kgramstats.cpp b/kgramstats.cpp index 16bf598..b4e68eb 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp @@ -206,7 +206,7 @@ vector kgramstats::randomSentence(int n) { if (rand() % (maxK - cur.size() + 1) == 0) { - while (cur.size() > 0) + while (cur.size() > 1) { if ((rand() % (n)) < cuts) { @@ -246,7 +246,7 @@ vector kgramstats::randomSentence(int n) { nextToken[0] = toupper(nextToken[0]); } - + /* if (startquote < next->startquote) { nextToken = "\"" + nextToken; @@ -288,7 +288,7 @@ vector kgramstats::randomSentence(int n) nextToken += ","; } - +*/ if (cur.size() == maxK) { cur.pop_front(); @@ -336,5 +336,5 @@ std::string canonize(std::string f) string result; remove_copy_if(canonical.begin(), canonical.end(), std::back_inserter(result), removeIf); - return result; -} \ No newline at end of file + return canonical; +} -- cgit 1.4.1