From 6746da6edd7d9d50efe374eabbb79a3cac882d81 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 16 Jan 2017 18:02:50 -0500 Subject: Started structural rewrite The new object structure was designed to build on the existing WordNet structure, while also adding in all of the data that we get from other sources. More information about this can be found on the project wiki. The generator has already been completely rewritten to generate a datafile that uses the new structure. In addition, a number of indexes are created, which does double the size of the datafile, but also allows for much faster lookups. Finally, the new generator is written modularly and is a lot more readable than the old one. The verbly interface to the new object structure has mostly been completed, but has not been tested fully. There is a completely new search API which utilizes a lot of operator overloading; documentation on how to use it should go up at some point. Token processing and verb frames are currently unimplemented. Source for these have been left in the repository for now. --- lib/noun_query.h | 180 ------------------------------------------------------- 1 file changed, 180 deletions(-) delete mode 100644 lib/noun_query.h (limited to 'lib/noun_query.h') diff --git a/lib/noun_query.h b/lib/noun_query.h deleted file mode 100644 index 74df260..0000000 --- a/lib/noun_query.h +++ /dev/null @@ -1,180 +0,0 @@ -#ifndef NOUN_QUERY_H_5DE51DD7 -#define NOUN_QUERY_H_5DE51DD7 - -namespace verbly { - - class noun_query { - public: - noun_query(const data& _data); - - noun_query& limit(int _limit); - noun_query& random(); - noun_query& except(const noun& _word); - noun_query& rhymes_with(const word& _word); - noun_query& rhymes_with(rhyme _r); - noun_query& has_pronunciation(); - noun_query& has_rhyming_noun(); - noun_query& has_rhyming_adjective(); - noun_query& has_rhyming_adverb(); - noun_query& has_rhyming_verb(); - noun_query& with_stress(filter> _arg); - - noun_query& with_singular_form(std::string _arg); - noun_query& with_prefix(filter _f); - noun_query& with_suffix(filter _f); - - noun_query& requires_plural_form(); - - noun_query& with_complexity(int _arg); - - noun_query& is_hypernym(); - noun_query& hypernym_of(filter _f); - noun_query& full_hypernym_of(filter _f); - - noun_query& is_hyponym(); - noun_query& hyponym_of(filter _f); - noun_query& full_hyponym_of(filter _f); - - noun_query& is_part_meronym(); - noun_query& part_meronym_of(filter _f); - noun_query& full_part_meronym_of(filter _f); - - noun_query& is_part_holonym(); - noun_query& part_holonym_of(filter _f); - noun_query& full_part_holonym_of(filter _f); - - noun_query& is_substance_meronym(); - noun_query& substance_meronym_of(filter _f); - noun_query& full_substance_meronym_of(filter _f); - - noun_query& is_substance_holonym(); - noun_query& substance_holonym_of(filter _f); - noun_query& full_substance_holonym_of(filter _f); - - noun_query& is_member_meronym(); - noun_query& member_meronym_of(filter _f); - noun_query& full_member_meronym_of(filter _f); - - noun_query& is_member_holonym(); - noun_query& member_holonym_of(filter _f); - noun_query& full_member_holonym_of(filter _f); - - noun_query& is_proper(); - noun_query& is_not_proper(); - - noun_query& is_instance(); - noun_query& instance_of(filter _f); - - noun_query& is_class(); - noun_query& class_of(filter _f); - - noun_query& has_synonyms(); - noun_query& synonym_of(filter _f); - - noun_query& has_antonyms(); - noun_query& antonym_of(filter _f); - - noun_query& has_pertainym(); - noun_query& anti_pertainym_of(filter _f); - - noun_query& is_attribute(); - noun_query& attribute_of(filter _f); - - noun_query& at_least_n_images(int _arg); - noun_query& with_wnid(int _arg); - -/* noun_query& derived_from(const word& _w); - noun_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 _has_rhyming_noun = false; - bool _has_rhyming_adjective = false; - bool _has_rhyming_adverb = false; - bool _has_rhyming_verb = false; - filter> _stress; - - std::list _with_singular_form; - filter _with_prefix; - filter _with_suffix; - - int _with_complexity = unlimited; - - bool _requires_plural_form = false; - - bool _is_hypernym = false; - filter _hypernym_of; - filter _full_hypernym_of; - - bool _is_hyponym = false; - filter _hyponym_of; - filter _full_hyponym_of; - - bool _is_part_meronym = false; - filter _part_meronym_of; - filter _full_part_meronym_of; - - bool _is_substance_meronym = false; - filter _substance_meronym_of; - filter _full_substance_meronym_of; - - bool _is_member_meronym = false; - filter _member_meronym_of; - filter _full_member_meronym_of; - - bool _is_part_holonym = false; - filter _part_holonym_of; - filter _full_part_holonym_of; - - bool _is_substance_holonym = false; - filter _substance_holonym_of; - filter _full_substance_holonym_of; - - bool _is_member_holonym = false; - filter _member_holonym_of; - filter _full_member_holonym_of; - - bool _is_proper = false; - bool _is_not_proper = false; - - bool _is_instance = false; - filter _instance_of; - - bool _is_class = false; - filter _class_of; - - bool _has_synonyms = false; - filter _synonym_of; - - bool _has_antonyms = false; - filter _antonym_of; - - bool _has_pertainym = false; - filter _anti_pertainym_of; - - bool _is_attribute = false; - filter _attribute_of; - - int _at_least_n_images = unlimited; - std::set _with_wnid; - -/* 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: NOUN_QUERY_H_5DE51DD7 */ -- cgit 1.4.1