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/preposition.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/preposition.h')
-rw-r--r-- | lib/preposition.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/preposition.h b/lib/preposition.h new file mode 100644 index 0000000..89f24fa --- /dev/null +++ b/lib/preposition.h | |||
@@ -0,0 +1,38 @@ | |||
1 | #ifndef PREPOSITION_H_FF908021 | ||
2 | #define PREPOSITION_H_FF908021 | ||
3 | |||
4 | namespace verbly { | ||
5 | |||
6 | class preposition_query; | ||
7 | |||
8 | class preposition { | ||
9 | public: | ||
10 | std::string get_form() const; | ||
11 | |||
12 | private: | ||
13 | friend class preposition_query; | ||
14 | |||
15 | std::string form; | ||
16 | }; | ||
17 | |||
18 | class preposition_query { | ||
19 | public: | ||
20 | preposition_query(const data& _data); | ||
21 | |||
22 | preposition_query& limit(int _limit); | ||
23 | preposition_query& random(); | ||
24 | preposition_query& in_group(std::string _arg); | ||
25 | |||
26 | std::list<preposition> run() const; | ||
27 | |||
28 | const static int unlimited = -1; | ||
29 | private: | ||
30 | const data& _data; | ||
31 | int _limit = unlimited; | ||
32 | bool _random = false; | ||
33 | std::list<std::string> _in_group; | ||
34 | }; | ||
35 | |||
36 | }; | ||
37 | |||
38 | #endif /* end of include guard: PREPOSITION_H_FF908021 */ | ||