summary refs log tree commit diff stats
path: root/lib/noun_query.h
blob: 19fbc6018df9a0771957010778ec9313cb68a2b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#ifndef NOUN_QUERY_H_5DE51DD7
#define NOUN_QUERY_H_5DE51DD7

namespace verbly {
  
  class noun_query {
    public:
      noun_query(const data& _data);
      
      noun_query& limit(int _limit);
      noun_query& random();
      noun_query& except(const noun& _word);
      noun_query& rhymes_with(const word& _word);
      noun_query& has_pronunciation();
      noun_query& has_rhyming_noun();
      noun_query& has_rhyming_adjective();
      noun_query& has_rhyming_adverb();
      noun_query& has_rhyming_verb();
      
      noun_query& with_singular_form(std::string _arg);
      noun_query& with_prefix(filter<std::string> _f);
      noun_query& with_suffix(filter<std::string> _f);
      
      noun_query& requires_plural_form();
      
      noun_query& with_complexity(int _arg);
      
      noun_query& is_hypernym();
      noun_query& hypernym_of(filter<noun> _f);
      noun_query& full_hypernym_of(filter<noun> _f);
      
      noun_query& is_hyponym();
      noun_query& hyponym_of(filter<noun> _f);
      noun_query& full_hyponym_of(filter<noun> _f);
      
      noun_query& is_part_meronym();
      noun_query& part_meronym_of(filter<noun> _f);
      noun_query& full_part_meronym_of(filter<noun> _f);
      
      noun_query& is_part_holonym();
      noun_query& part_holonym_of(filter<noun> _f);
      noun_query& full_part_holonym_of(filter<noun> _f);
      
      noun_query& is_substance_meronym();
      noun_query& substance_meronym_of(filter<noun> _f);
      noun_query& full_substance_meronym_of(filter<noun> _f);
      
      noun_query& is_substance_holonym();
      noun_query& substance_holonym_of(filter<noun> _f);
      noun_query& full_substance_holonym_of(filter<noun> _f);
      
      noun_query& is_member_meronym();
      noun_query& member_meronym_of(filter<noun> _f);
      noun_query& full_member_meronym_of(filter<noun> _f);
      
      noun_query& is_member_holonym();
      noun_query& member_holonym_of(filter<noun> _f);
      noun_query& full_member_holonym_of(filter<noun> _f);
      
      noun_query& is_proper();
      noun_query& is_not_proper();
      
      noun_query& is_instance();
      noun_query& instance_of(filter<noun> _f);
      
      noun_query& is_class();
      noun_query& class_of(filter<noun> _f);
      
      noun_query& has_synonyms();
      noun_query& synonym_of(filter<noun> _f);
      
      noun_query& has_antonyms();
      noun_query& antonym_of(filter<noun> _f);
      
      noun_query& has_pertainym();
      noun_query& anti_pertainym_of(filter<adjective> _f);
      
      noun_query& is_attribute();
      noun_query& attribute_of(filter<adjective> _f);
      
      noun_query& at_least_n_images(int _arg);
      noun_query& with_wnid(int _arg);
      
/*      noun_query& derived_from(const word& _w);
      noun_query& not_derived_from(const word& _w);*/
      
      std::list<noun> run() const;
      
      const static int unlimited = -1;
      
    private:
      const data& _data;
      int _limit = unlimited;
      bool _random = false;
      std::list<rhyme> _rhymes;
      std::list<noun> _except;
      bool _has_prn = false;
      bool _has_rhyming_noun = false;
      bool _has_rhyming_adjective = false;
      bool _has_rhyming_adverb = false;
      bool _has_rhyming_verb = false;
      
      std::list<std::string> _with_singular_form;
      filter<std::string> _with_prefix;
      filter<std::string> _with_suffix;
      
      int _with_complexity = unlimited;
      
      bool _requires_plural_form = false;
      
      bool _is_hypernym = false;
      filter<noun> _hypernym_of;
      filter<noun> _full_hypernym_of;
      
      bool _is_hyponym = false;
      filter<noun> _hyponym_of;
      filter<noun> _full_hyponym_of;
      
      bool _is_part_meronym = false;
      filter<noun> _part_meronym_of;
      filter<noun> _full_part_meronym_of;
      
      bool _is_substance_meronym = false;
      filter<noun> _substance_meronym_of;
      filter<noun> _full_substance_meronym_of;
      
      bool _is_member_meronym = false;
      filter<noun> _member_meronym_of;
      filter<noun> _full_member_meronym_of;
      
      bool _is_part_holonym = false;
      filter<noun> _part_holonym_of;
      filter<noun> _full_part_holonym_of;
      
      bool _is_substance_holonym = false;
      filter<noun> _substance_holonym_of;
      filter<noun> _full_substance_holonym_of;
      
      bool _is_member_holonym = false;
      filter<noun> _member_holonym_of;
      filter<noun> _full_member_holonym_of;
      
      bool _is_proper = false;
      bool _is_not_proper = false;
      
      bool _is_instance = false;
      filter<noun> _instance_of;
      
      bool _is_class = false;
      filter<noun> _class_of;
      
      bool _has_synonyms = false;
      filter<noun> _synonym_of;
      
      bool _has_antonyms = false;
      filter<noun> _antonym_of;
      
      bool _has_pertainym = false;
      filter<adjective> _anti_pertainym_of;
      
      bool _is_attribute = false;
      filter<adjective> _attribute_of;
      
      int _at_least_n_images = unlimited;
      std::set<int> _with_wnid;
      
/*      std::list<adjective> _derived_from_adjective;
      std::list<adjective> _not_derived_from_adjective;
      std::list<adverb> _derived_from_adverb;
      std::list<adverb> _not_derived_from_adverb;
      std::list<noun> _derived_from_noun;
      std::list<noun> _not_derived_from_noun;*/
  };
  
};

#endif /* end of include guard: NOUN_QUERY_H_5DE51DD7 */