summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-02-03 20:25:22 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-02-03 20:25:22 -0500
commit659a8e94a77d6f1518667da227db414b2294f976 (patch)
tree5dfaa74ed756ee2b8d85b940b7338837f2e8b02e
parent7ce570bc98a5ad813cd5ad3220a5275aa02622df (diff)
downloadadvice-659a8e94a77d6f1518667da227db414b2294f976.tar.gz
advice-659a8e94a77d6f1518667da227db414b2294f976.tar.bz2
advice-659a8e94a77d6f1518667da227db414b2294f976.zip
Fixed references to old field names
-rw-r--r--sentence.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/sentence.cpp b/sentence.cpp index 421aaf6..c31d226 100644 --- a/sentence.cpp +++ b/sentence.cpp
@@ -385,18 +385,20 @@ verbly::token sentence::generateClause(
385 385
386 verbly::filter frameCondition = 386 verbly::filter frameCondition =
387 (verbly::frame::length >= 2) 387 (verbly::frame::length >= 2)
388 && (verbly::frame::part(0) %= ( 388 && (verbly::frame::parts(0) %= (
389 (verbly::part::type == verbly::part_type::noun_phrase) 389 (verbly::part::type == verbly::part_type::noun_phrase)
390 && (verbly::part::role == "Agent")) 390 && (verbly::part::role == "Agent"))
391 && !(verbly::frame::part() %= ( 391 && (verbly::frame::parts(1) %=
392 verbly::part::synrestr %= "adjp"))); 392 (verbly::part::type == verbly::part_type::verb))
393 && !(verbly::frame::parts() %= (
394 verbly::part::synrestrs %= "adjp")));
393 395
394 if (it.hasSynrestr("experiencer")) 396 if (it.hasSynrestr("experiencer"))
395 { 397 {
396 frameCondition &= 398 frameCondition &=
397 (verbly::frame::part(2) %= 399 (verbly::frame::parts(2) %=
398 (verbly::part::type == verbly::part_type::noun_phrase) 400 (verbly::part::type == verbly::part_type::noun_phrase)
399 && !(verbly::part::synrestr %= "genitive") 401 && !(verbly::part::synrestrs %= "genitive")
400 && ((verbly::part::role == "Patient") 402 && ((verbly::part::role == "Patient")
401 || (verbly::part::role == "Experiencer"))); 403 || (verbly::part::role == "Experiencer")));
402 } 404 }
@@ -407,13 +409,13 @@ verbly::token sentence::generateClause(
407 409
408 if (it.hasSynrestr("participle_phrase")) 410 if (it.hasSynrestr("participle_phrase"))
409 { 411 {
410 verbCondition &= (verbly::lemma::form(verbly::inflection::ing_form)); 412 verbCondition &= (verbly::lemma::forms(verbly::inflection::ing_form));
411 } else if (it.hasSynrestr("progressive")) 413 } else if (it.hasSynrestr("progressive"))
412 { 414 {
413 verbCondition &= (verbly::lemma::form(verbly::inflection::s_form)); 415 verbCondition &= (verbly::lemma::forms(verbly::inflection::s_form));
414 } else if (it.hasSynrestr("past_participle")) 416 } else if (it.hasSynrestr("past_participle"))
415 { 417 {
416 verbCondition &= (verbly::lemma::form(verbly::inflection::past_participle)); 418 verbCondition &= (verbly::lemma::forms(verbly::inflection::past_participle));
417 } 419 }
418 420
419 // Because of the tag distribution, it's possible (albeit extremely unlikely) 421 // Because of the tag distribution, it's possible (albeit extremely unlikely)
@@ -618,7 +620,7 @@ verbly::token sentence::generateClause(
618 verbly::filter pgf(true); 620 verbly::filter pgf(true);
619 for (const std::string& choice : part.getPrepositionChoices()) 621 for (const std::string& choice : part.getPrepositionChoices())
620 { 622 {
621 pgf += (verbly::notion::prepositionGroup == choice); 623 pgf += (verbly::notion::prepositionGroups == choice);
622 } 624 }
623 625
624 utter << database_.words(pgf && (verbly::notion::partOfSpeech == verbly::part_of_speech::preposition)).first(); 626 utter << database_.words(pgf && (verbly::notion::partOfSpeech == verbly::part_of_speech::preposition)).first();
@@ -730,7 +732,7 @@ void sentence::visit(verbly::token& it) const
730 it = verbly::token( 732 it = verbly::token(
731 database_.words( 733 database_.words(
732 (verbly::notion::partOfSpeech == verbly::part_of_speech::verb) 734 (verbly::notion::partOfSpeech == verbly::part_of_speech::verb)
733 && (verbly::lemma::form(verbly::inflection::ing_form))).first(), 735 && (verbly::lemma::forms(verbly::inflection::ing_form))).first(),
734 verbly::inflection::ing_form); 736 verbly::inflection::ing_form);
735 } else { 737 } else {
736 it = generateClause(it); 738 it = generateClause(it);