summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-02-13 09:46:27 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-02-13 09:46:27 -0500
commitff9c531e1b502d4fc708737cc1664d1df018f49f (patch)
treeee953b56a066c927e5d4ec3f04a5bd24d0a99995
parent32f32562c43437dc6b43aa81b4ed22c83e14739b (diff)
downloadadvice-ff9c531e1b502d4fc708737cc1664d1df018f49f.tar.gz
advice-ff9c531e1b502d4fc708737cc1664d1df018f49f.tar.bz2
advice-ff9c531e1b502d4fc708737cc1664d1df018f49f.zip
Updated how the genitive synrestr work
-rw-r--r--sentence.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/sentence.cpp b/sentence.cpp index e36f660..5f1b03a 100644 --- a/sentence.cpp +++ b/sentence.cpp
@@ -435,9 +435,6 @@ verbly::token sentence::generateClause(
435 { 435 {
436 utter << "your"; 436 utter << "your";
437 utter << std::set<std::string>({"participle_phrase", "subjectless"}); 437 utter << std::set<std::string>({"participle_phrase", "subjectless"});
438 } else if (part.nounHasSynrestr("genitive"))
439 {
440 utter << "your";
441 } else if (part.nounHasSynrestr("adv_loc")) 438 } else if (part.nounHasSynrestr("adv_loc"))
442 { 439 {
443 if (std::bernoulli_distribution(1.0/2.0)(rng_)) 440 if (std::bernoulli_distribution(1.0/2.0)(rng_))
@@ -512,6 +509,14 @@ verbly::token sentence::generateClause(
512 509
513 utter << ("\"" + sentence.compile() + "\""); 510 utter << ("\"" + sentence.compile() + "\"");
514 } else { 511 } else {
512 if (part.nounHasSynrestr("genitive"))
513 {
514 verbly::word noun = generateStandardNoun("Passive", {"animate"});
515 verbly::token owner = generateStandardNounPhrase(noun, "Passive", false, true);
516 std::string ownerStr = owner.compile() + "'s";
517 utter << ownerStr;
518 }
519
515 verbly::word noun = generateStandardNoun(part.getNounRole(), part.getNounSelrestrs()); 520 verbly::word noun = generateStandardNoun(part.getNounRole(), part.getNounSelrestrs());
516 521
517 bool plural = part.nounHasSynrestr("plural") || chooseSelrestr(part.getNounSelrestrs(), {"group", "plural"}); 522 bool plural = part.nounHasSynrestr("plural") || chooseSelrestr(part.getNounSelrestrs(), {"group", "plural"});