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/adverb.h | 62 +----------------------------------------------------------- 1 file changed, 1 insertion(+), 61 deletions(-) (limited to 'lib/adverb.h') diff --git a/lib/adverb.h b/lib/adverb.h index 65e3c5c..56d4e28 100644 --- a/lib/adverb.h +++ b/lib/adverb.h @@ -12,6 +12,7 @@ namespace verbly { friend class adverb_query; public: + adverb(); adverb(const data& _data, int _id); std::string base_form() const; @@ -29,67 +30,6 @@ namespace verbly { adverb_query& not_derived_from(const word& _w); }; - class adverb_query { - public: - adverb_query(const data& _data); - - adverb_query& limit(int _limit); - adverb_query& random(bool _random); - adverb_query& except(const adverb& _word); - adverb_query& rhymes_with(const word& _word); - adverb_query& has_pronunciation(bool _has_prn); - - adverb_query& requires_comparative_form(bool _arg); - adverb_query& requires_superlative_form(bool _arg); - - adverb_query& has_antonyms(bool _arg); - adverb_query& antonym_of(const adverb& _adv); - adverb_query& not_antonym_of(const adverb& _adv); - - adverb_query& has_synonyms(bool _arg); - adverb_query& synonym_of(const adverb& _adv); - adverb_query& not_synonym_of(const adverb& _adv); - - adverb_query& is_mannernymic(bool _arg); - adverb_query& mannernym_of(const adjective& _adj); - - adverb_query& derived_from(const word& _w); - adverb_query& not_derived_from(const word& _w); - - std::list run() const; - - const static int unlimited = -1; - - private: - const data& _data; - int _limit = unlimited; - bool _random = false; - std::list _rhymes; - std::list _except; - bool _has_prn = false; - - bool _requires_comparative_form = false; - bool _requires_superlative_form = false; - - bool _has_antonyms = false; - std::list _antonym_of; - std::list _not_antonym_of; - - bool _has_synonyms = false; - std::list _synonym_of; - std::list _not_synonym_of; - - bool _is_mannernymic = false; - std::list _mannernym_of; - - std::list _derived_from_adjective; - std::list _not_derived_from_adjective; - std::list _derived_from_adverb; - std::list _not_derived_from_adverb; - std::list _derived_from_noun; - std::list _not_derived_from_noun; - }; - }; #endif /* end of include guard: ADVERB_H_86F8302F */ -- cgit 1.4.1