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/verb_query.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/verb_query.h')
| -rw-r--r-- | lib/verb_query.h | 34 |
1 files changed, 34 insertions, 0 deletions
| diff --git a/lib/verb_query.h b/lib/verb_query.h new file mode 100644 index 0000000..24f5732 --- /dev/null +++ b/lib/verb_query.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef VERB_QUERY_H_34E5A679 | ||
| 2 | #define VERB_QUERY_H_34E5A679 | ||
| 3 | |||
| 4 | namespace 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& has_pronunciation(); | ||
| 15 | |||
| 16 | verb_query& has_frames(); | ||
| 17 | |||
| 18 | std::list<verb> run() const; | ||
| 19 | |||
| 20 | const static int unlimited = -1; | ||
| 21 | |||
| 22 | private: | ||
| 23 | const data& _data; | ||
| 24 | int _limit = unlimited; | ||
| 25 | bool _random = false; | ||
| 26 | std::list<std::string> _rhymes; | ||
| 27 | std::list<verb> _except; | ||
| 28 | bool _has_prn = false; | ||
| 29 | bool _has_frames = false; | ||
| 30 | }; | ||
| 31 | |||
| 32 | }; | ||
| 33 | |||
| 34 | #endif /* end of include guard: VERB_QUERY_H_34E5A679 */ | ||
