diff options
-rw-r--r-- | advice.cpp | 9 | ||||
-rw-r--r-- | sentence.cpp | 16 | ||||
m--------- | vendor/verbly | 0 |
3 files changed, 13 insertions, 12 deletions
diff --git a/advice.cpp b/advice.cpp index 3428512..18be163 100644 --- a/advice.cpp +++ b/advice.cpp | |||
@@ -89,7 +89,7 @@ void advice::run() const | |||
89 | int backoff = 0; | 89 | int backoff = 0; |
90 | 90 | ||
91 | std::cout << "Generating noun..." << std::endl; | 91 | std::cout << "Generating noun..." << std::endl; |
92 | std::cout << "Noun: " << pictured.getBaseForm() << std::endl; | 92 | std::cout << "Noun: " << pictured.getBaseForm().getText() << std::endl; |
93 | std::cout << "Getting URLs..." << std::endl; | 93 | std::cout << "Getting URLs..." << std::endl; |
94 | 94 | ||
95 | std::string lstdata; | 95 | std::string lstdata; |
@@ -295,7 +295,8 @@ void advice::run() const | |||
295 | try | 295 | try |
296 | { | 296 | { |
297 | pic.magick("png"); | 297 | pic.magick("png"); |
298 | pic.write(&outputimg); | 298 | //pic.write(&outputimg); |
299 | pic.write("output.png"); | ||
299 | } catch (const Magick::WarningCoder& e) | 300 | } catch (const Magick::WarningCoder& e) |
300 | { | 301 | { |
301 | // Ignore | 302 | // Ignore |
@@ -310,8 +311,8 @@ void advice::run() const | |||
310 | tweetText = tweetText.substr(0, tweetLim - 1) + "…"; | 311 | tweetText = tweetText.substr(0, tweetLim - 1) + "…"; |
311 | } | 312 | } |
312 | 313 | ||
313 | long media_id = client_->uploadMedia("image/png", (const char*) outputimg.data(), outputimg.length()); | 314 | //long media_id = client_->uploadMedia("image/png", (const char*) outputimg.data(), outputimg.length()); |
314 | client_->updateStatus(tweetText, {media_id}); | 315 | //client_->updateStatus(tweetText, {media_id}); |
315 | 316 | ||
316 | std::cout << "Tweeted!" << std::endl << "Waiting..." << std::endl; | 317 | std::cout << "Tweeted!" << std::endl << "Waiting..." << std::endl; |
317 | 318 | ||
diff --git a/sentence.cpp b/sentence.cpp index 83592d9..1ae6563 100644 --- a/sentence.cpp +++ b/sentence.cpp | |||
@@ -307,7 +307,7 @@ verbly::token sentence::generateStandardNounPhrase( | |||
307 | { | 307 | { |
308 | utter << "your"; | 308 | utter << "your"; |
309 | } else if (!plural) { | 309 | } else if (!plural) { |
310 | if (sounder.getLemma().getBaseForm().startsWithVowelSound()) | 310 | if (sounder.getBaseForm().startsWithVowelSound()) |
311 | { | 311 | { |
312 | utter << "an"; | 312 | utter << "an"; |
313 | } else { | 313 | } else { |
@@ -316,12 +316,12 @@ verbly::token sentence::generateStandardNounPhrase( | |||
316 | } | 316 | } |
317 | } | 317 | } |
318 | 318 | ||
319 | if (descript) | 319 | if (descript.isValid()) |
320 | { | 320 | { |
321 | utter << descript; | 321 | utter << descript; |
322 | } | 322 | } |
323 | 323 | ||
324 | if (plural && noun.getLemma().hasInflection(verbly::inflection::plural)) | 324 | if (plural && noun.hasInflection(verbly::inflection::plural)) |
325 | { | 325 | { |
326 | utter << verbly::token(noun, verbly::inflection::plural); | 326 | utter << verbly::token(noun, verbly::inflection::plural); |
327 | } else { | 327 | } else { |
@@ -364,13 +364,13 @@ verbly::token sentence::generateClause( | |||
364 | 364 | ||
365 | if (it.hasSynrestr("participle_phrase")) | 365 | if (it.hasSynrestr("participle_phrase")) |
366 | { | 366 | { |
367 | verbCondition &= (verbly::lemma::forms(verbly::inflection::ing_form)); | 367 | verbCondition &= (verbly::word::forms(verbly::inflection::ing_form)); |
368 | } else if (it.hasSynrestr("progressive")) | 368 | } else if (it.hasSynrestr("progressive")) |
369 | { | 369 | { |
370 | verbCondition &= (verbly::lemma::forms(verbly::inflection::s_form)); | 370 | verbCondition &= (verbly::word::forms(verbly::inflection::s_form)); |
371 | } else if (it.hasSynrestr("past_participle")) | 371 | } else if (it.hasSynrestr("past_participle")) |
372 | { | 372 | { |
373 | verbCondition &= (verbly::lemma::forms(verbly::inflection::past_participle)); | 373 | verbCondition &= (verbly::word::forms(verbly::inflection::past_participle)); |
374 | } | 374 | } |
375 | 375 | ||
376 | // Because of the tag distribution, it's possible (albeit extremely unlikely) | 376 | // Because of the tag distribution, it's possible (albeit extremely unlikely) |
@@ -533,7 +533,7 @@ verbly::token sentence::generateClause( | |||
533 | 533 | ||
534 | case verbly::part_type::verb: | 534 | case verbly::part_type::verb: |
535 | { | 535 | { |
536 | std::cout << "V: " << verb.getBaseForm() << std::endl; | 536 | std::cout << "V: " << verb.getBaseForm().getText() << std::endl; |
537 | 537 | ||
538 | if (it.hasSynrestr("progressive")) | 538 | if (it.hasSynrestr("progressive")) |
539 | { | 539 | { |
@@ -683,7 +683,7 @@ void sentence::visit(verbly::token& it) const | |||
683 | it = verbly::token( | 683 | it = verbly::token( |
684 | database_.words( | 684 | database_.words( |
685 | (verbly::notion::partOfSpeech == verbly::part_of_speech::verb) | 685 | (verbly::notion::partOfSpeech == verbly::part_of_speech::verb) |
686 | && (verbly::lemma::forms(verbly::inflection::ing_form))).first(), | 686 | && (verbly::word::forms(verbly::inflection::ing_form))).first(), |
687 | verbly::inflection::ing_form); | 687 | verbly::inflection::ing_form); |
688 | } else { | 688 | } else { |
689 | it = generateClause(it); | 689 | it = generateClause(it); |
diff --git a/vendor/verbly b/vendor/verbly | |||
Subproject a3a033c730a2eb4242076f5b34823190aa441cd | Subproject 4208387c4a6b7ecf43d756a8bba96b9cfc5227b | ||