diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-16 21:35:35 -0400 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-16 21:35:35 -0400 |
| commit | 8b1333d0e6e2b9a5014bdbff2987d899f5413fee (patch) | |
| tree | ab5c864b61cab267ad3118e8cbe637c151448aa5 /verbly/lib/noun.h | |
| parent | 3aceae8ab1eb5992110ea57a9479bbc3177feb21 (diff) | |
| download | furries-8b1333d0e6e2b9a5014bdbff2987d899f5413fee.tar.gz furries-8b1333d0e6e2b9a5014bdbff2987d899f5413fee.tar.bz2 furries-8b1333d0e6e2b9a5014bdbff2987d899f5413fee.zip | |
Added word derivational relationships (kind of eh at the moment) and moved verbly into its own directory
Diffstat (limited to 'verbly/lib/noun.h')
| -rw-r--r-- | verbly/lib/noun.h | 183 |
1 files changed, 183 insertions, 0 deletions
| diff --git a/verbly/lib/noun.h b/verbly/lib/noun.h new file mode 100644 index 0000000..da76866 --- /dev/null +++ b/verbly/lib/noun.h | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | #ifndef NOUN_H_24A03C83 | ||
| 2 | #define NOUN_H_24A03C83 | ||
| 3 | |||
| 4 | namespace verbly { | ||
| 5 | |||
| 6 | class noun : public word { | ||
| 7 | private: | ||
| 8 | std::string _singular; | ||
| 9 | std::string _plural; | ||
| 10 | |||
| 11 | friend class noun_query; | ||
| 12 | |||
| 13 | public: | ||
| 14 | noun(const data& _data, int _id); | ||
| 15 | |||
| 16 | std::string base_form() const; | ||
| 17 | std::string singular_form() const; | ||
| 18 | std::string plural_form() const; | ||
| 19 | |||
| 20 | bool has_plural_form() const; | ||
| 21 | |||
| 22 | noun_query hypernyms() const; | ||
| 23 | noun_query hyponyms() const; | ||
| 24 | noun_query part_meronyms() const; | ||
| 25 | noun_query part_holonyms() const; | ||
| 26 | noun_query substance_meronyms() const; | ||
| 27 | noun_query substance_holonyms() const; | ||
| 28 | noun_query member_meronyms() const; | ||
| 29 | noun_query member_holonyms() const; | ||
| 30 | noun_query classes() const; | ||
| 31 | noun_query instances() const; | ||
| 32 | noun_query synonyms() const; | ||
| 33 | noun_query antonyms() const; | ||
| 34 | adjective_query pertainyms() const; | ||
| 35 | adjective_query variations() const; | ||
| 36 | }; | ||
| 37 | |||
| 38 | class noun_query { | ||
| 39 | public: | ||
| 40 | noun_query(const data& _data); | ||
| 41 | |||
| 42 | noun_query& limit(int _limit); | ||
| 43 | noun_query& random(bool _random); | ||
| 44 | noun_query& except(const noun& _word); | ||
| 45 | noun_query& rhymes_with(const word& _word); | ||
| 46 | noun_query& has_pronunciation(bool _has_prn); | ||
| 47 | |||
| 48 | noun_query& is_hypernym(bool _arg); | ||
| 49 | noun_query& hypernym_of(const noun& _noun); | ||
| 50 | noun_query& not_hypernym_of(const noun& _noun); | ||
| 51 | |||
| 52 | noun_query& is_hyponym(bool _arg); | ||
| 53 | noun_query& hyponym_of(const noun& _noun); | ||
| 54 | noun_query& not_hyponym_of(const noun& _noun); | ||
| 55 | |||
| 56 | noun_query& is_part_meronym(bool _arg); | ||
| 57 | noun_query& part_meronym_of(const noun& _noun); | ||
| 58 | noun_query& not_part_meronym_of(const noun& _noun); | ||
| 59 | |||
| 60 | noun_query& is_part_holonym(bool _arg); | ||
| 61 | noun_query& part_holonym_of(const noun& _noun); | ||
| 62 | noun_query& not_part_holonym_of(const noun& _noun); | ||
| 63 | |||
| 64 | noun_query& is_substance_meronym(bool _arg); | ||
| 65 | noun_query& substance_meronym_of(const noun& _noun); | ||
| 66 | noun_query& not_substance_meronym_of(const noun& _noun); | ||
| 67 | |||
| 68 | noun_query& is_substance_holonym(bool _arg); | ||
| 69 | noun_query& substance_holonym_of(const noun& _noun); | ||
| 70 | noun_query& not_substance_holonym_of(const noun& _noun); | ||
| 71 | |||
| 72 | noun_query& is_member_meronym(bool _arg); | ||
| 73 | noun_query& member_meronym_of(const noun& _noun); | ||
| 74 | noun_query& not_member_meronym_of(const noun& _noun); | ||
| 75 | |||
| 76 | noun_query& is_member_holonym(bool _arg); | ||
| 77 | noun_query& member_holonym_of(const noun& _noun); | ||
| 78 | noun_query& not_member_holonym_of(const noun& _noun); | ||
| 79 | |||
| 80 | noun_query& is_proper(bool _arg); | ||
| 81 | noun_query& is_not_proper(bool _arg); | ||
| 82 | noun_query& instance_of(const noun& _noun); | ||
| 83 | noun_query& not_instance_of(const noun& _noun); | ||
| 84 | |||
| 85 | noun_query& is_class(bool _arg); | ||
| 86 | noun_query& class_of(const noun& _noun); | ||
| 87 | noun_query& not_class_of(const noun& _noun); | ||
| 88 | |||
| 89 | noun_query& has_synonyms(bool _arg); | ||
| 90 | noun_query& synonym_of(const noun& _noun); | ||
| 91 | noun_query& not_synonym_of(const noun& _noun); | ||
| 92 | |||
| 93 | noun_query& has_antonyms(bool _arg); | ||
| 94 | noun_query& antonym_of(const noun& _noun); | ||
| 95 | noun_query& not_antonym_of(const noun& _noun); | ||
| 96 | |||
| 97 | noun_query& has_pertainym(bool _arg); | ||
| 98 | noun_query& anti_pertainym_of(const adjective& _adj); | ||
| 99 | |||
| 100 | noun_query& is_attribute(bool _arg); | ||
| 101 | noun_query& attribute_of(const adjective& _adj); | ||
| 102 | |||
| 103 | noun_query& derived_from(const word& _w); | ||
| 104 | noun_query& not_derived_from(const word& _w); | ||
| 105 | |||
| 106 | std::list<noun> run() const; | ||
| 107 | |||
| 108 | const static int unlimited = -1; | ||
| 109 | |||
| 110 | private: | ||
| 111 | const data& _data; | ||
| 112 | int _limit = unlimited; | ||
| 113 | bool _random = false; | ||
| 114 | std::list<std::string> _rhymes; | ||
| 115 | std::list<noun> _except; | ||
| 116 | bool _has_prn = false; | ||
| 117 | |||
| 118 | bool _is_hypernym = false; | ||
| 119 | std::list<noun> _hypernym_of; | ||
| 120 | std::list<noun> _not_hypernym_of; | ||
| 121 | |||
| 122 | bool _is_hyponym = false; | ||
| 123 | std::list<noun> _hyponym_of; | ||
| 124 | std::list<noun> _not_hyponym_of; | ||
| 125 | |||
| 126 | bool _is_part_meronym = false; | ||
| 127 | std::list<noun> _part_meronym_of; | ||
| 128 | std::list<noun> _not_part_meronym_of; | ||
| 129 | |||
| 130 | bool _is_substance_meronym = false; | ||
| 131 | std::list<noun> _substance_meronym_of; | ||
| 132 | std::list<noun> _not_substance_meronym_of; | ||
| 133 | |||
| 134 | bool _is_member_meronym = false; | ||
| 135 | std::list<noun> _member_meronym_of; | ||
| 136 | std::list<noun> _not_member_meronym_of; | ||
| 137 | |||
| 138 | bool _is_part_holonym = false; | ||
| 139 | std::list<noun> _part_holonym_of; | ||
| 140 | std::list<noun> _not_part_holonym_of; | ||
| 141 | |||
| 142 | bool _is_substance_holonym = false; | ||
| 143 | std::list<noun> _substance_holonym_of; | ||
| 144 | std::list<noun> _not_substance_holonym_of; | ||
| 145 | |||
| 146 | bool _is_member_holonym = false; | ||
| 147 | std::list<noun> _member_holonym_of; | ||
| 148 | std::list<noun> _not_member_holonym_of; | ||
| 149 | |||
| 150 | bool _is_proper = false; | ||
| 151 | bool _is_not_proper = false; | ||
| 152 | std::list<noun> _instance_of; | ||
| 153 | std::list<noun> _not_instance_of; | ||
| 154 | |||
| 155 | bool _is_class = false; | ||
| 156 | std::list<noun> _class_of; | ||
| 157 | std::list<noun> _not_class_of; | ||
| 158 | |||
| 159 | bool _has_synonyms = false; | ||
| 160 | std::list<noun> _synonym_of; | ||
| 161 | std::list<noun> _not_synonym_of; | ||
| 162 | |||
| 163 | bool _has_antonyms = false; | ||
| 164 | std::list<noun> _antonym_of; | ||
| 165 | std::list<noun> _not_antonym_of; | ||
| 166 | |||
| 167 | bool _has_pertainym = false; | ||
| 168 | std::list<adjective> _anti_pertainym_of; | ||
| 169 | |||
| 170 | bool _is_attribute = false; | ||
| 171 | std::list<adjective> _attribute_of; | ||
| 172 | |||
| 173 | std::list<adjective> _derived_from_adjective; | ||
| 174 | std::list<adjective> _not_derived_from_adjective; | ||
| 175 | std::list<adverb> _derived_from_adverb; | ||
| 176 | std::list<adverb> _not_derived_from_adverb; | ||
| 177 | std::list<noun> _derived_from_noun; | ||
| 178 | std::list<noun> _not_derived_from_noun; | ||
| 179 | }; | ||
| 180 | |||
| 181 | }; | ||
| 182 | |||
| 183 | #endif /* end of include guard: NOUN_H_24A03C83 */ | ||
