summary refs log tree commit diff stats
path: root/sentence.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-02-10 11:25:22 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-02-10 11:25:22 -0500
commit45940415dc6316268938c4ca26dfdd8b254508eb (patch)
treefe3f0f11853d1692e8fd350b089bcfb58db23e30 /sentence.cpp
parent939b89fbefee73a26eed4bc27c7714c79c74ec74 (diff)
downloadadvice-45940415dc6316268938c4ca26dfdd8b254508eb.tar.gz
advice-45940415dc6316268938c4ca26dfdd8b254508eb.tar.bz2
advice-45940415dc6316268938c4ca26dfdd8b254508eb.zip
Updated verbly (bugfix)
Diffstat (limited to 'sentence.cpp')
-rw-r--r--sentence.cpp16
1 files changed, 8 insertions, 8 deletions
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);