about summary refs log tree commit diff stats
path: root/kgramstats.cpp
diff options
context:
space:
mode:
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);