diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-24 23:16:07 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-24 23:16:07 -0400 |
commit | eef5de613c75661e5d94baa086f6f2ddc26c7ed0 (patch) | |
tree | 180230f6a245c5bca94d894273f5d2b93ded3f04 /lib/adjective.h | |
parent | d5ee4e39e5b5b3b8daa85cd972802195ad35e965 (diff) | |
download | verbly-eef5de613c75661e5d94baa086f6f2ddc26c7ed0.tar.gz verbly-eef5de613c75661e5d94baa086f6f2ddc26c7ed0.tar.bz2 verbly-eef5de613c75661e5d94baa086f6f2ddc26c7ed0.zip |
Added verb frames
In addition: - Added prepositions. - Rewrote a lot of the query interface. It now, for a lot of relationships, supports nested AND, OR, and NOT logic. - Rewrote the token class. It is now a union-like class instead of being polymorphic, which means smart pointers are no longer necessary. - Querying with regards to word derivation has been temporarily removed. - Sentinel values are now supported for all word types. - The VerbNet data retrieved from http://verbs.colorado.edu/~mpalmer/projects/verbnet/downloads.html was found to not be perfectly satisfactory in some regards, especially regarding adjective phrases. A patch file is now included in the repository describing the changes made to the VerbNet v3.2 download for the canonical verbly datafile.
Diffstat (limited to 'lib/adjective.h')
-rw-r--r-- | lib/adjective.h | 94 |
1 files changed, 1 insertions, 93 deletions
diff --git a/lib/adjective.h b/lib/adjective.h index 3dcab9b..a6eb293 100644 --- a/lib/adjective.h +++ b/lib/adjective.h | |||
@@ -25,6 +25,7 @@ namespace verbly { | |||
25 | friend class adjective_query; | 25 | friend class adjective_query; |
26 | 26 | ||
27 | public: | 27 | public: |
28 | adjective(); | ||
28 | adjective(const data& _data, int _id); | 29 | adjective(const data& _data, int _id); |
29 | 30 | ||
30 | std::string base_form() const; | 31 | std::string base_form() const; |
@@ -45,99 +46,6 @@ namespace verbly { | |||
45 | noun_query attributes() const; | 46 | noun_query attributes() const; |
46 | }; | 47 | }; |
47 | 48 | ||
48 | class adjective_query { | ||
49 | public: | ||
50 | adjective_query(const data& _data); | ||
51 | |||
52 | adjective_query& limit(int _limit); | ||
53 | adjective_query& random(bool _random); | ||
54 | adjective_query& except(const adjective& _word); | ||
55 | adjective_query& rhymes_with(const word& _word); | ||
56 | adjective_query& has_pronunciation(bool _has_prn); | ||
57 | |||
58 | adjective_query& requires_comparative_form(bool req); | ||
59 | adjective_query& requires_superlative_form(bool req); | ||
60 | adjective_query& position(adjective::positioning pos); | ||
61 | |||
62 | adjective_query& is_variant(bool _is_variant); | ||
63 | adjective_query& variant_of(const noun& _noun); | ||
64 | adjective_query& not_variant_of(const noun& _noun); | ||
65 | |||
66 | adjective_query& has_antonyms(bool _is_antonymic); | ||
67 | adjective_query& antonym_of(const adjective& _adj); | ||
68 | adjective_query& not_antonym_of(const adjective& _adj); | ||
69 | |||
70 | adjective_query& has_synonyms(bool _is_synonymic); | ||
71 | adjective_query& synonym_of(const adjective& _adj); | ||
72 | adjective_query& not_synonym_of(const adjective& _adj); | ||
73 | |||
74 | adjective_query& is_generalization(bool _is_generalization); | ||
75 | adjective_query& generalization_of(const adjective& _adj); | ||
76 | adjective_query& not_generalization_of(const adjective& _adj); | ||
77 | |||
78 | adjective_query& is_specification(bool _is_specification); | ||
79 | adjective_query& specification_of(const adjective& _adj); | ||
80 | adjective_query& not_specification_of(const adjective& _adj); | ||
81 | |||
82 | adjective_query& is_pertainymic(bool _is_pertainymic); | ||
83 | adjective_query& pertainym_of(const noun& _noun); | ||
84 | |||
85 | adjective_query& is_mannernymic(bool _is_mannernymic); | ||
86 | adjective_query& anti_mannernym_of(const adverb& _adv); | ||
87 | |||
88 | adjective_query& derived_from(const word& _w); | ||
89 | adjective_query& not_derived_from(const word& _w); | ||
90 | |||
91 | std::list<adjective> run() const; | ||
92 | |||
93 | const static int unlimited = -1; | ||
94 | |||
95 | protected: | ||
96 | const data& _data; | ||
97 | int _limit = unlimited; | ||
98 | bool _random = false; | ||
99 | std::list<std::string> _rhymes; | ||
100 | std::list<adjective> _except; | ||
101 | bool _has_prn = false; | ||
102 | |||
103 | bool _requires_comparative_form = false; | ||
104 | bool _requires_superlative_form = false; | ||
105 | adjective::positioning _position = adjective::positioning::undefined; | ||
106 | |||
107 | bool _is_variant = false; | ||
108 | std::list<noun> _variant_of; | ||
109 | std::list<noun> _not_variant_of; | ||
110 | |||
111 | bool _is_antonymic = false; | ||
112 | std::list<adjective> _antonym_of; | ||
113 | std::list<adjective> _not_antonym_of; | ||
114 | |||
115 | bool _is_synonymic = false; | ||
116 | std::list<adjective> _synonym_of; | ||
117 | std::list<adjective> _not_synonym_of; | ||
118 | |||
119 | bool _is_generalization = false; | ||
120 | std::list<adjective> _generalization_of; | ||
121 | std::list<adjective> _not_generalization_of; | ||
122 | |||
123 | bool _is_specification = false; | ||
124 | std::list<adjective> _specification_of; | ||
125 | std::list<adjective> _not_specification_of; | ||
126 | |||
127 | bool _is_pertainymic = false; | ||
128 | std::list<noun> _pertainym_of; | ||
129 | |||
130 | bool _is_mannernymic = false; | ||
131 | std::list<adverb> _anti_mannernym_of; | ||
132 | |||
133 | std::list<adjective> _derived_from_adjective; | ||
134 | std::list<adjective> _not_derived_from_adjective; | ||
135 | std::list<adverb> _derived_from_adverb; | ||
136 | std::list<adverb> _not_derived_from_adverb; | ||
137 | std::list<noun> _derived_from_noun; | ||
138 | std::list<noun> _not_derived_from_noun; | ||
139 | }; | ||
140 | |||
141 | }; | 49 | }; |
142 | 50 | ||
143 | #endif /* end of include guard: ADJECTIVE_H_87B3FB75 */ | 51 | #endif /* end of include guard: ADJECTIVE_H_87B3FB75 */ |