summary refs log tree commit diff stats
path: root/lib/verb.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/verb.h')
-rw-r--r--lib/verb.h45
1 files changed, 3 insertions, 42 deletions
diff --git a/lib/verb.h b/lib/verb.h index 7cc87e2..7a2486e 100644 --- a/lib/verb.h +++ b/lib/verb.h
@@ -3,26 +3,7 @@
3 3
4namespace verbly { 4namespace verbly {
5 5
6 /*class frame_part { 6 class frame_query;
7
8 };
9
10 class frame {
11 private:
12 std::list<frame_part> content;
13 std::map<std::string, std::vector<std::list<frame_part>::iterator>> predicates;
14
15 public:
16 frame(std::list<frame_part> content) : content(content)
17 {
18
19 }
20
21 std::unique_ptr<token> make_utterance() const
22 {
23
24 }
25 };*/
26 7
27 class verb : public word { 8 class verb : public word {
28 private: 9 private:
@@ -35,6 +16,7 @@ namespace verbly {
35 friend class verb_query; 16 friend class verb_query;
36 17
37 public: 18 public:
19 verb();
38 verb(const data& _data, int _id); 20 verb(const data& _data, int _id);
39 21
40 std::string base_form() const; 22 std::string base_form() const;
@@ -43,29 +25,8 @@ namespace verbly {
43 std::string past_participle_form() const; 25 std::string past_participle_form() const;
44 std::string ing_form() const; 26 std::string ing_form() const;
45 std::string s_form() const; 27 std::string s_form() const;
46 };
47
48 class verb_query {
49 public:
50 verb_query(const data& _data);
51
52 verb_query& limit(int _limit);
53 verb_query& random(bool _random);
54 verb_query& except(const verb& _word);
55 verb_query& rhymes_with(const word& _word);
56 verb_query& has_pronunciation(bool _has_prn);
57 28
58 std::list<verb> run() const; 29 frame_query frames() const;
59
60 const static int unlimited = -1;
61
62 private:
63 const data& _data;
64 int _limit = unlimited;
65 bool _random = false;
66 std::list<std::string> _rhymes;
67 std::list<verb> _except;
68 bool _has_prn = false;
69 }; 30 };
70 31
71}; 32};