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/adjective.h | 94 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 93 deletions(-) (limited to 'lib/adjective.h') 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 { friend class adjective_query; public: + adjective(); adjective(const data& _data, int _id); std::string base_form() const; @@ -45,99 +46,6 @@ namespace verbly { noun_query attributes() const; }; - class adjective_query { - public: - adjective_query(const data& _data); - - adjective_query& limit(int _limit); - adjective_query& random(bool _random); - adjective_query& except(const adjective& _word); - adjective_query& rhymes_with(const word& _word); - adjective_query& has_pronunciation(bool _has_prn); - - adjective_query& requires_comparative_form(bool req); - adjective_query& requires_superlative_form(bool req); - adjective_query& position(adjective::positioning pos); - - adjective_query& is_variant(bool _is_variant); - adjective_query& variant_of(const noun& _noun); - adjective_query& not_variant_of(const noun& _noun); - - adjective_query& has_antonyms(bool _is_antonymic); - adjective_query& antonym_of(const adjective& _adj); - adjective_query& not_antonym_of(const adjective& _adj); - - adjective_query& has_synonyms(bool _is_synonymic); - adjective_query& synonym_of(const adjective& _adj); - adjective_query& not_synonym_of(const adjective& _adj); - - adjective_query& is_generalization(bool _is_generalization); - adjective_query& generalization_of(const adjective& _adj); - adjective_query& not_generalization_of(const adjective& _adj); - - adjective_query& is_specification(bool _is_specification); - adjective_query& specification_of(const adjective& _adj); - adjective_query& not_specification_of(const adjective& _adj); - - adjective_query& is_pertainymic(bool _is_pertainymic); - adjective_query& pertainym_of(const noun& _noun); - - adjective_query& is_mannernymic(bool _is_mannernymic); - adjective_query& anti_mannernym_of(const adverb& _adv); - - adjective_query& derived_from(const word& _w); - adjective_query& not_derived_from(const word& _w); - - std::list run() const; - - const static int unlimited = -1; - - protected: - 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; - adjective::positioning _position = adjective::positioning::undefined; - - bool _is_variant = false; - std::list _variant_of; - std::list _not_variant_of; - - bool _is_antonymic = false; - std::list _antonym_of; - std::list _not_antonym_of; - - bool _is_synonymic = false; - std::list _synonym_of; - std::list _not_synonym_of; - - bool _is_generalization = false; - std::list _generalization_of; - std::list _not_generalization_of; - - bool _is_specification = false; - std::list _specification_of; - std::list _not_specification_of; - - bool _is_pertainymic = false; - std::list _pertainym_of; - - bool _is_mannernymic = false; - std::list _anti_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: ADJECTIVE_H_87B3FB75 */ -- cgit 1.4.1