about summary refs log tree commit diff stats
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
parent73821856c9648d030f4d148d2bc50f07f43ad369 (diff)
downloadrawr-ebooks-37fec8860a780f8974d026f84e3009ded21a308c.tar.gz
rawr-ebooks-37fec8860a780f8974d026f84e3009ded21a308c.tar.bz2
rawr-ebooks-37fec8860a780f8974d026f84e3009ded21a308c.zip
Member hiding is fun
-rw-r--r--kgramstats.cpp4
-rw-r--r--kgramstats.h2
2 files changed, 3 insertions, 3 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);
diff --git a/kgramstats.h b/kgramstats.h index a024184..5fad37d 100644 --- a/kgramstats.h +++ b/kgramstats.h
@@ -97,7 +97,7 @@ class kgramstats
97{ 97{
98public: 98public:
99 kgramstats(std::string corpus, int maxK); 99 kgramstats(std::string corpus, int maxK);
100 std::string randomSentence(int max); 100 std::string randomSentence(int maxL);
101 101
102private: 102private:
103 struct token_data 103 struct token_data