about summary refs log tree commit diff stats
path: root/kgramstats.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-03-08 14:56:10 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-03-08 14:56:10 -0500
commit37fec8860a780f8974d026f84e3009ded21a308c (patch)
treedeebbe5a839a68feb1dbb8a9e8e71cc5cbe0a714 /kgramstats.cpp
parent73821856c9648d030f4d148d2bc50f07f43ad369 (diff)
downloadrawr-ebooks-37fec8860a780f8974d026f84e3009ded21a308c.tar.gz
rawr-ebooks-37fec8860a780f8974d026f84e3009ded21a308c.tar.bz2
rawr-ebooks-37fec8860a780f8974d026f84e3009ded21a308c.zip
Member hiding is fun
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 899ad20..38bf973 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp
@@ -457,7 +457,7 @@ void printKgram(kgram k)
457} 457}
458 458
459// runs in O(n log t) time where n is the input number of sentences and t is the number of tokens in the input corpus 459// runs in O(n log t) time where n is the input number of sentences and t is the number of tokens in the input corpus
460std::string kgramstats::randomSentence(int max) 460std::string kgramstats::randomSentence(int maxL)
461{ 461{
462 std::string result; 462 std::string result;
463 kgram cur(1, wildcardQuery); 463 kgram cur(1, wildcardQuery);
@@ -613,7 +613,7 @@ std::string kgramstats::randomSentence(int max)
613 } 613 }
614 614
615 // Went over the limit, so reset 615 // Went over the limit, so reset
616 if (result.length() > max) 616 if (result.length() > maxL)
617 { 617 {
618 result = ""; 618 result = "";
619 cur = kgram(1, wildcardQuery); 619 cur = kgram(1, wildcardQuery);