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_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/adverb_query.h')
| -rw-r--r-- | lib/adverb_query.h | 65 |
1 files changed, 65 insertions, 0 deletions
| diff --git a/lib/adverb_query.h b/lib/adverb_query.h new file mode 100644 index 0000000..20f9ce5 --- /dev/null +++ b/lib/adverb_query.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | #ifndef ADVERB_QUERY_H_CA13CCDD | ||
| 2 | #define ADVERB_QUERY_H_CA13CCDD | ||
| 3 | |||
| 4 | namespace verbly { | ||
| 5 | |||
| 6 | class adverb_query { | ||
| 7 | public: | ||
| 8 | adverb_query(const data& _data); | ||
| 9 | |||
| 10 | adverb_query& limit(int _limit); | ||
| 11 | adverb_query& random(); | ||
| 12 | adverb_query& except(const adverb& _word); | ||
| 13 | adverb_query& rhymes_with(const word& _word); | ||
| 14 | adverb_query& has_pronunciation(); | ||
| 15 | |||
| 16 | adverb_query& requires_comparative_form(); | ||
| 17 | adverb_query& requires_superlative_form(); | ||
| 18 | |||
| 19 | adverb_query& has_antonyms(); | ||
| 20 | adverb_query& antonym_of(filter<adverb> _f); | ||
| 21 | |||
| 22 | adverb_query& has_synonyms(); | ||
| 23 | adverb_query& synonym_of(filter<adverb> _f); | ||
| 24 | |||
| 25 | adverb_query& is_mannernymic(); | ||
| 26 | adverb_query& mannernym_of(filter<adjective> _f); | ||
| 27 | |||
| 28 | /* adverb_query& derived_from(const word& _w); | ||
| 29 | adverb_query& not_derived_from(const word& _w);*/ | ||
| 30 | |||
| 31 | std::list<adverb> run() const; | ||
| 32 | |||
| 33 | const static int unlimited = -1; | ||
| 34 | |||
| 35 | private: | ||
| 36 | const data& _data; | ||
| 37 | int _limit = unlimited; | ||
| 38 | bool _random = false; | ||
| 39 | std::list<std::string> _rhymes; | ||
| 40 | std::list<adverb> _except; | ||
| 41 | bool _has_prn = false; | ||
| 42 | |||
| 43 | bool _requires_comparative_form = false; | ||
| 44 | bool _requires_superlative_form = false; | ||
| 45 | |||
| 46 | bool _has_antonyms = false; | ||
| 47 | filter<adverb> _antonym_of; | ||
| 48 | |||
| 49 | bool _has_synonyms = false; | ||
| 50 | filter<adverb> _synonym_of; | ||
| 51 | |||
| 52 | bool _is_mannernymic = false; | ||
| 53 | filter<adjective> _mannernym_of; | ||
| 54 | |||
| 55 | /* std::list<adjective> _derived_from_adjective; | ||
| 56 | std::list<adjective> _not_derived_from_adjective; | ||
| 57 | std::list<adverb> _derived_from_adverb; | ||
| 58 | std::list<adverb> _not_derived_from_adverb; | ||
| 59 | std::list<noun> _derived_from_noun; | ||
| 60 | std::list<noun> _not_derived_from_noun;*/ | ||
| 61 | }; | ||
| 62 | |||
| 63 | }; | ||
| 64 | |||
| 65 | #endif /* end of include guard: ADVERB_QUERY_H_CA13CCDD */ | ||
