From 040ee58fecdc9c478004bc2e554e1ae126ec4602 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 15 Apr 2016 17:24:44 -0400 Subject: 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. --- lib/noun_query.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/noun_query.h') 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 { 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);*/ @@ -146,6 +149,9 @@ namespace verbly { 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; -- cgit 1.4.1