diff options
Diffstat (limited to 'sentence.cpp')
| -rw-r--r-- | sentence.cpp | 11 |
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"}); |
