summary refs log tree commit diff stats
path: root/lib/verb_query.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-01-16 18:02:50 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-01-16 18:02:50 -0500
commit6746da6edd7d9d50efe374eabbb79a3cac882d81 (patch)
treeff20917e08b08d36b9541c1371106596e7bec442 /lib/verb_query.h
parent4af7e55733098ca42f75a4ffaca1b0f6bab4dd36 (diff)
downloadverbly-6746da6edd7d9d50efe374eabbb79a3cac882d81.tar.gz
verbly-6746da6edd7d9d50efe374eabbb79a3cac882d81.tar.bz2
verbly-6746da6edd7d9d50efe374eabbb79a3cac882d81.zip
Started structural rewrite
The new object structure was designed to build on the existing WordNet
structure, while also adding in all of the data that we get from other sources.
More information about this can be found on the project wiki.

The generator has already been completely rewritten to generate a
datafile that uses the new structure. In addition, a number of indexes
are created, which does double the size of the datafile, but also allows
for much faster lookups. Finally, the new generator is written modularly
and is a lot more readable than the old one.

The verbly interface to the new object structure has mostly been
completed, but has not been tested fully. There is a completely new
search API which utilizes a lot of operator overloading; documentation
on how to use it should go up at some point.

Token processing and verb frames are currently unimplemented. Source for
these have been left in the repository for now.
Diffstat (limited to 'lib/verb_query.h')
-rw-r--r--lib/verb_query.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/verb_query.h b/lib/verb_query.h deleted file mode 100644 index 566ae37..0000000 --- a/lib/verb_query.h +++ /dev/null
@@ -1,45 +0,0 @@
1#ifndef VERB_QUERY_H_34E5A679
2#define VERB_QUERY_H_34E5A679
3
4namespace verbly {
5
6 class verb_query {
7 public:
8 verb_query(const data& _data);
9
10 verb_query& limit(int _limit);
11 verb_query& random();
12 verb_query& except(const verb& _word);
13 verb_query& rhymes_with(const word& _word);
14 verb_query& rhymes_with(rhyme _r);
15 verb_query& has_pronunciation();
16 verb_query& has_rhyming_noun();
17 verb_query& has_rhyming_adjective();
18 verb_query& has_rhyming_adverb();
19 verb_query& has_rhyming_verb();
20 verb_query& with_stress(filter<std::vector<bool>> _arg);
21
22 verb_query& has_frames();
23
24 std::list<verb> run() const;
25
26 const static int unlimited = -1;
27
28 private:
29 const data& _data;
30 int _limit = unlimited;
31 bool _random = false;
32 std::list<rhyme> _rhymes;
33 std::list<verb> _except;
34 bool _has_prn = false;
35 bool _has_frames = false;
36 bool _has_rhyming_noun = false;
37 bool _has_rhyming_adjective = false;
38 bool _has_rhyming_adverb = false;
39 bool _has_rhyming_verb = false;
40 filter<std::vector<bool>> _stress;
41 };
42
43};
44
45#endif /* end of include guard: VERB_QUERY_H_34E5A679 */