From dc210ee6eba3b1d173808bd858113f6abd90bff1 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 16 Mar 2016 21:35:35 -0400 Subject: Added word derivational relationships (kind of eh at the moment) and moved verbly into its own directory --- lib/verb.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 lib/verb.h (limited to 'lib/verb.h') diff --git a/lib/verb.h b/lib/verb.h new file mode 100644 index 0000000..7cc87e2 --- /dev/null +++ b/lib/verb.h @@ -0,0 +1,73 @@ +#ifndef VERB_H_BCC929AD +#define VERB_H_BCC929AD + +namespace verbly { + + /*class frame_part { + + }; + + class frame { + private: + std::list content; + std::map::iterator>> predicates; + + public: + frame(std::list content) : content(content) + { + + } + + std::unique_ptr make_utterance() const + { + + } + };*/ + + class verb : public word { + private: + std::string _infinitive; + std::string _past_tense; + std::string _past_participle; + std::string _ing_form; + std::string _s_form; + + friend class verb_query; + + public: + verb(const data& _data, int _id); + + std::string base_form() const; + std::string infinitive_form() const; + std::string past_tense_form() const; + std::string past_participle_form() const; + std::string ing_form() const; + std::string s_form() const; + }; + + class verb_query { + public: + verb_query(const data& _data); + + verb_query& limit(int _limit); + verb_query& random(bool _random); + verb_query& except(const verb& _word); + verb_query& rhymes_with(const word& _word); + verb_query& has_pronunciation(bool _has_prn); + + std::list run() const; + + const static int unlimited = -1; + + private: + const data& _data; + int _limit = unlimited; + bool _random = false; + std::list _rhymes; + std::list _except; + bool _has_prn = false; + }; + +}; + +#endif /* end of include guard: VERB_H_BCC929AD */ -- cgit 1.4.1