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/adverb.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/adverb.h')
| -rw-r--r-- | lib/adverb.h | 62 |
1 files changed, 1 insertions, 61 deletions
| 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 { | |||
| 12 | friend class adverb_query; | 12 | friend class adverb_query; |
| 13 | 13 | ||
| 14 | public: | 14 | public: |
| 15 | adverb(); | ||
| 15 | adverb(const data& _data, int _id); | 16 | adverb(const data& _data, int _id); |
| 16 | 17 | ||
| 17 | std::string base_form() const; | 18 | std::string base_form() const; |
| @@ -29,67 +30,6 @@ namespace verbly { | |||
| 29 | adverb_query& not_derived_from(const word& _w); | 30 | adverb_query& not_derived_from(const word& _w); |
| 30 | }; | 31 | }; |
| 31 | 32 | ||
| 32 | class adverb_query { | ||
| 33 | public: | ||
| 34 | adverb_query(const data& _data); | ||
| 35 | |||
| 36 | adverb_query& limit(int _limit); | ||
| 37 | adverb_query& random(bool _random); | ||
| 38 | adverb_query& except(const adverb& _word); | ||
| 39 | adverb_query& rhymes_with(const word& _word); | ||
| 40 | adverb_query& has_pronunciation(bool _has_prn); | ||
| 41 | |||
| 42 | adverb_query& requires_comparative_form(bool _arg); | ||
| 43 | adverb_query& requires_superlative_form(bool _arg); | ||
| 44 | |||
| 45 | adverb_query& has_antonyms(bool _arg); | ||
| 46 | adverb_query& antonym_of(const adverb& _adv); | ||
| 47 | adverb_query& not_antonym_of(const adverb& _adv); | ||
| 48 | |||
| 49 | adverb_query& has_synonyms(bool _arg); | ||
| 50 | adverb_query& synonym_of(const adverb& _adv); | ||
| 51 | adverb_query& not_synonym_of(const adverb& _adv); | ||
| 52 | |||
| 53 | adverb_query& is_mannernymic(bool _arg); | ||
| 54 | adverb_query& mannernym_of(const adjective& _adj); | ||
| 55 | |||
| 56 | adverb_query& derived_from(const word& _w); | ||
| 57 | adverb_query& not_derived_from(const word& _w); | ||
| 58 | |||
| 59 | std::list<adverb> run() const; | ||
| 60 | |||
| 61 | const static int unlimited = -1; | ||
| 62 | |||
| 63 | private: | ||
| 64 | const data& _data; | ||
| 65 | int _limit = unlimited; | ||
| 66 | bool _random = false; | ||
| 67 | std::list<std::string> _rhymes; | ||
| 68 | std::list<adverb> _except; | ||
| 69 | bool _has_prn = false; | ||
| 70 | |||
| 71 | bool _requires_comparative_form = false; | ||
| 72 | bool _requires_superlative_form = false; | ||
| 73 | |||
| 74 | bool _has_antonyms = false; | ||
| 75 | std::list<adverb> _antonym_of; | ||
| 76 | std::list<adverb> _not_antonym_of; | ||
| 77 | |||
| 78 | bool _has_synonyms = false; | ||
| 79 | std::list<adverb> _synonym_of; | ||
| 80 | std::list<adverb> _not_synonym_of; | ||
| 81 | |||
| 82 | bool _is_mannernymic = false; | ||
| 83 | std::list<adjective> _mannernym_of; | ||
| 84 | |||
| 85 | std::list<adjective> _derived_from_adjective; | ||
| 86 | std::list<adjective> _not_derived_from_adjective; | ||
| 87 | std::list<adverb> _derived_from_adverb; | ||
| 88 | std::list<adverb> _not_derived_from_adverb; | ||
| 89 | std::list<noun> _derived_from_noun; | ||
| 90 | std::list<noun> _not_derived_from_noun; | ||
| 91 | }; | ||
| 92 | |||
| 93 | }; | 33 | }; |
| 94 | 34 | ||
| 95 | #endif /* end of include guard: ADVERB_H_86F8302F */ | 35 | #endif /* end of include guard: ADVERB_H_86F8302F */ |
