From eef5de613c75661e5d94baa086f6f2ddc26c7ed0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 24 Mar 2016 23:16:07 -0400 Subject: 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. --- lib/preposition.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lib/preposition.h (limited to 'lib/preposition.h') 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 @@ +#ifndef PREPOSITION_H_FF908021 +#define PREPOSITION_H_FF908021 + +namespace verbly { + + class preposition_query; + + class preposition { + public: + std::string get_form() const; + + private: + friend class preposition_query; + + std::string form; + }; + + class preposition_query { + public: + preposition_query(const data& _data); + + preposition_query& limit(int _limit); + preposition_query& random(); + preposition_query& in_group(std::string _arg); + + std::list run() const; + + const static int unlimited = -1; + private: + const data& _data; + int _limit = unlimited; + bool _random = false; + std::list _in_group; + }; + +}; + +#endif /* end of include guard: PREPOSITION_H_FF908021 */ -- cgit 1.4.1