From 8c2e7c646f2a549ea9b4db831d8088f57b3287ae Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 4 Feb 2017 10:32:55 -0500 Subject: Updated verbly (new API) Notably, the bot should not be able to use ethnic slurs now. sentence.cpp is basically just copied from advice. --- sentence.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sentence.h (limited to 'sentence.h') diff --git a/sentence.h b/sentence.h new file mode 100644 index 0000000..abf6860 --- /dev/null +++ b/sentence.h @@ -0,0 +1,39 @@ +#ifndef SENTENCE_H_81987F60 +#define SENTENCE_H_81987F60 + +#include +#include +#include + +class sentence { +public: + + sentence( + const verbly::database& database, + std::mt19937& rng); + + std::string generate() const; + +private: + + verbly::filter parseSelrestrs(verbly::selrestr selrestr) const; + + bool requiresSelrestr(std::string restriction, verbly::selrestr selrestr) const; + + verbly::word generateStandardNoun(std::string role, verbly::selrestr selrestrs) const; + + verbly::token generateStandardNounPhrase( + const verbly::word& noun, + std::string role, + bool plural, + bool definite) const; + + verbly::token generateClause(const verbly::token& it) const; + + void visit(verbly::token& it) const; + + const verbly::database& database_; + std::mt19937& rng_; +}; + +#endif /* end of include guard: SENTENCE_H_81987F60 */ -- cgit 1.4.1