summary refs log tree commit diff stats
path: root/lib/adjective.cpp
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/adjective.cpp
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/adjective.cpp')
-rw-r--r--lib/adjective.cpp113
1 files changed, 0 insertions, 113 deletions
diff --git a/lib/adjective.cpp b/lib/adjective.cpp deleted file mode 100644 index ba8254a..0000000 --- a/lib/adjective.cpp +++ /dev/null
@@ -1,113 +0,0 @@
1#include "verbly.h"
2
3namespace verbly {
4
5 adjective::adjective()
6 {
7
8 }
9
10 adjective::adjective(const data& _data, int _id) : word(_data, _id)
11 {
12
13 }
14
15 std::string adjective::base_form() const
16 {
17 assert(_valid == true);
18
19 return _base_form;
20 }
21
22 std::string adjective::comparative_form() const
23 {
24 assert(_valid == true);
25
26 return _comparative_form;
27 }
28
29 std::string adjective::superlative_form() const
30 {
31 assert(_valid == true);
32
33 return _superlative_form;
34 }
35
36 adjective::positioning adjective::position() const
37 {
38 assert(_valid == true);
39
40 return _position;
41 }
42
43 bool adjective::has_comparative_form() const
44 {
45 assert(_valid == true);
46
47 return !_comparative_form.empty();
48 }
49
50 bool adjective::has_superlative_form() const
51 {
52 assert(_valid == true);
53
54 return !_superlative_form.empty();
55 }
56
57 bool adjective::has_position() const
58 {
59 assert(_valid == true);
60
61 return _position != adjective::positioning::undefined;
62 }
63
64 adjective_query adjective::antonyms() const
65 {
66 assert(_valid == true);
67
68 return _data->adjectives().antonym_of(*this);
69 }
70
71 adjective_query adjective::synonyms() const
72 {
73 assert(_valid == true);
74
75 return _data->adjectives().synonym_of(*this);
76 }
77
78 adjective_query adjective::generalizations() const
79 {
80 assert(_valid == true);
81
82 return _data->adjectives().generalization_of(*this);
83 }
84
85 adjective_query adjective::specifications() const
86 {
87 assert(_valid == true);
88
89 return _data->adjectives().specification_of(*this);
90 }
91
92 noun_query adjective::anti_pertainyms() const
93 {
94 assert(_valid == true);
95
96 return _data->nouns().anti_pertainym_of(*this);
97 }
98
99 adverb_query adjective::mannernyms() const
100 {
101 assert(_valid == true);
102
103 return _data->adverbs().mannernym_of(*this);
104 }
105
106 noun_query adjective::attributes() const
107 {
108 assert(_valid == true);
109
110 return _data->nouns().attribute_of(*this);
111 }
112
113};