diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-15 17:24:44 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-15 17:24:44 -0400 |
commit | 040ee58fecdc9c478004bc2e554e1ae126ec4602 (patch) | |
tree | 672a75690952ba8055ab9765ba0a475e056e35d4 /lib/noun_query.h | |
parent | 3a225f5eb709262b9d44d49519136ea9a2a71000 (diff) | |
download | verbly-040ee58fecdc9c478004bc2e554e1ae126ec4602.tar.gz verbly-040ee58fecdc9c478004bc2e554e1ae126ec4602.tar.bz2 verbly-040ee58fecdc9c478004bc2e554e1ae126ec4602.zip |
Added support for ImageNet and fixed bug with query interface
Datafile change: nouns now know how many images are associated with them on ImageNet, and also have their WordNet synset ID saved so that you can query for images of that noun via the ImageNet API. So far, verbly only exposes the ImageNet API URL, and doesn't actually interact with it itself. This may be changed in the future. The query interface had a huge issue in which multiple instances of the same condition would overwrite each other. This has been fixed.
Diffstat (limited to 'lib/noun_query.h')
-rw-r--r-- | lib/noun_query.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/noun_query.h b/lib/noun_query.h index 5b73f8d..8768f5d 100644 --- a/lib/noun_query.h +++ b/lib/noun_query.h | |||
@@ -72,6 +72,9 @@ namespace verbly { | |||
72 | noun_query& is_attribute(); | 72 | noun_query& is_attribute(); |
73 | noun_query& attribute_of(filter<adjective> _f); | 73 | noun_query& attribute_of(filter<adjective> _f); |
74 | 74 | ||
75 | noun_query& at_least_n_images(int _arg); | ||
76 | noun_query& with_wnid(int _arg); | ||
77 | |||
75 | /* noun_query& derived_from(const word& _w); | 78 | /* noun_query& derived_from(const word& _w); |
76 | noun_query& not_derived_from(const word& _w);*/ | 79 | noun_query& not_derived_from(const word& _w);*/ |
77 | 80 | ||
@@ -146,6 +149,9 @@ namespace verbly { | |||
146 | bool _is_attribute = false; | 149 | bool _is_attribute = false; |
147 | filter<adjective> _attribute_of; | 150 | filter<adjective> _attribute_of; |
148 | 151 | ||
152 | int _at_least_n_images = unlimited; | ||
153 | std::set<int> _with_wnid; | ||
154 | |||
149 | /* std::list<adjective> _derived_from_adjective; | 155 | /* std::list<adjective> _derived_from_adjective; |
150 | std::list<adjective> _not_derived_from_adjective; | 156 | std::list<adjective> _not_derived_from_adjective; |
151 | std::list<adverb> _derived_from_adverb; | 157 | std::list<adverb> _derived_from_adverb; |