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. --- gen.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gen.cpp') diff --git a/gen.cpp b/gen.cpp index 1d381c8..31ba4dc 100644 --- a/gen.cpp +++ b/gen.cpp @@ -44,7 +44,7 @@ int main(int argc, char** args) } cout << "Preprocessing corpus..." << endl; - kgramstats* stats = new kgramstats(corpus, 5); + kgramstats* stats = new kgramstats(corpus, 3); cout << "Preprocessing freevars..." << endl; freevars* vars = new freevars(); @@ -61,10 +61,16 @@ int main(int argc, char** args) hi += vars->parse(*it) + " "; } + size_t lastperiod = hi.find_last_of("."); + if ((lastperiod != string::npos) && (rand() % 3 > 0)) + { + hi = hi.substr(0, lastperiod+1); + } + cout << hi << endl; getc(stdin); } return 0; -} \ No newline at end of file +} -- cgit 1.4.1