diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-24 11:15:12 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-24 11:15:12 -0500 |
| commit | ffc9edbc9fbeb65fd32c1fa24584010a83a6de31 (patch) | |
| tree | ee67417631a2bc44d83be8a69b9a300912501d06 /sentence.h | |
| download | support-ffc9edbc9fbeb65fd32c1fa24584010a83a6de31.tar.gz support-ffc9edbc9fbeb65fd32c1fa24584010a83a6de31.tar.bz2 support-ffc9edbc9fbeb65fd32c1fa24584010a83a6de31.zip | |
Created bot
Diffstat (limited to 'sentence.h')
| -rw-r--r-- | sentence.h | 38 |
1 files changed, 38 insertions, 0 deletions
| diff --git a/sentence.h b/sentence.h new file mode 100644 index 0000000..e3f2a03 --- /dev/null +++ b/sentence.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #ifndef SENTENCE_H_81987F60 | ||
| 2 | #define SENTENCE_H_81987F60 | ||
| 3 | |||
| 4 | #include <verbly.h> | ||
| 5 | #include <random> | ||
| 6 | #include <string> | ||
| 7 | |||
| 8 | class sentence { | ||
| 9 | public: | ||
| 10 | |||
| 11 | sentence( | ||
| 12 | const verbly::database& database, | ||
| 13 | std::mt19937& rng); | ||
| 14 | |||
| 15 | std::string generate() const; | ||
| 16 | |||
| 17 | private: | ||
| 18 | |||
| 19 | bool chooseSelrestr(std::set<std::string> selrestrs, std::set<std::string> choices) const; | ||
| 20 | |||
| 21 | verbly::word generateStandardNoun(std::string role, std::set<std::string> selrestrs) const; | ||
| 22 | |||
| 23 | verbly::token generateStandardNounPhrase( | ||
| 24 | const verbly::word& noun, | ||
| 25 | std::string role, | ||
| 26 | bool plural, | ||
| 27 | bool definite) const; | ||
| 28 | |||
| 29 | verbly::token generateClause(const verbly::token& it) const; | ||
| 30 | |||
| 31 | void visit(verbly::token& it) const; | ||
| 32 | |||
| 33 | const verbly::database& database_; | ||
| 34 | std::mt19937& rng_; | ||
| 35 | }; | ||
| 36 | |||
| 37 | #endif /* end of include guard: SENTENCE_H_81987F60 */ | ||
| 38 | |||
