diff options
Diffstat (limited to 'sentence.h')
-rw-r--r-- | sentence.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sentence.h b/sentence.h new file mode 100644 index 0000000..abf6860 --- /dev/null +++ b/sentence.h | |||
@@ -0,0 +1,39 @@ | |||
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 | verbly::filter parseSelrestrs(verbly::selrestr selrestr) const; | ||
20 | |||
21 | bool requiresSelrestr(std::string restriction, verbly::selrestr selrestr) const; | ||
22 | |||
23 | verbly::word generateStandardNoun(std::string role, verbly::selrestr selrestrs) const; | ||
24 | |||
25 | verbly::token generateStandardNounPhrase( | ||
26 | const verbly::word& noun, | ||
27 | std::string role, | ||
28 | bool plural, | ||
29 | bool definite) const; | ||
30 | |||
31 | verbly::token generateClause(const verbly::token& it) const; | ||
32 | |||
33 | void visit(verbly::token& it) const; | ||
34 | |||
35 | const verbly::database& database_; | ||
36 | std::mt19937& rng_; | ||
37 | }; | ||
38 | |||
39 | #endif /* end of include guard: SENTENCE_H_81987F60 */ | ||