summary refs log tree commit diff stats
path: root/lib/adverb_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/adverb_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/adverb_query.h')
-rw-r--r--lib/adverb_query.h86
1 files changed, 0 insertions, 86 deletions
diff --git a/lib/adverb_query.h b/lib/adverb_query.h deleted file mode 100644 index 30e7400..0000000 --- a/lib/adverb_query.h +++ /dev/null
@@ -1,86 +0,0 @@
1#ifndef ADVERB_QUERY_H_CA13CCDD
2#define ADVERB_QUERY_H_CA13CCDD
3
4namespace verbly {
5
6 class adverb_query {
7 public:
8 adverb_query(const data& _data);
9
10 adverb_query& limit(int _limit);
11 adverb_query& random();
12 adverb_query& except(const adverb& _word);
13 adverb_query& rhymes_with(const word& _word);
14 adverb_query& rhymes_with(rhyme _r);
15 adverb_query& has_pronunciation();
16 adverb_query& has_rhyming_noun();
17 adverb_query& has_rhyming_adjective();
18 adverb_query& has_rhyming_adverb();
19 adverb_query& has_rhyming_verb();
20 adverb_query& with_stress(filter<std::vector<bool>> _arg);
21
22 adverb_query& requires_comparative_form();
23 adverb_query& requires_superlative_form();
24
25 adverb_query& with_prefix(filter<std::string> _f);
26 adverb_query& with_suffix(filter<std::string> _f);
27
28 adverb_query& with_complexity(int _arg);
29
30 adverb_query& has_antonyms();
31 adverb_query& antonym_of(filter<adverb> _f);
32
33 adverb_query& has_synonyms();
34 adverb_query& synonym_of(filter<adverb> _f);
35
36 adverb_query& is_mannernymic();
37 adverb_query& mannernym_of(filter<adjective> _f);
38
39/* adverb_query& derived_from(const word& _w);
40 adverb_query& not_derived_from(const word& _w);*/
41
42 std::list<adverb> run() const;
43
44 const static int unlimited = -1;
45
46 private:
47 const data& _data;
48 int _limit = unlimited;
49 bool _random = false;
50 std::list<rhyme> _rhymes;
51 std::list<adverb> _except;
52 bool _has_prn = false;
53 bool _has_rhyming_noun = false;
54 bool _has_rhyming_adjective = false;
55 bool _has_rhyming_adverb = false;
56 bool _has_rhyming_verb = false;
57 filter<std::vector<bool>> _stress;
58
59 bool _requires_comparative_form = false;
60 bool _requires_superlative_form = false;
61
62 filter<std::string> _with_prefix;
63 filter<std::string> _with_suffix;
64
65 int _with_complexity = unlimited;
66
67 bool _has_antonyms = false;
68 filter<adverb> _antonym_of;
69
70 bool _has_synonyms = false;
71 filter<adverb> _synonym_of;
72
73 bool _is_mannernymic = false;
74 filter<adjective> _mannernym_of;
75
76/* std::list<adjective> _derived_from_adjective;
77 std::list<adjective> _not_derived_from_adjective;
78 std::list<adverb> _derived_from_adverb;
79 std::list<adverb> _not_derived_from_adverb;
80 std::list<noun> _derived_from_noun;
81 std::list<noun> _not_derived_from_noun;*/
82 };
83
84};
85
86#endif /* end of include guard: ADVERB_QUERY_H_CA13CCDD */