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.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/noun.h') diff --git a/lib/noun.h b/lib/noun.h index 969d2c8..bd71e57 100644 --- a/lib/noun.h +++ b/lib/noun.h @@ -7,6 +7,7 @@ namespace verbly { private: std::string _singular; std::string _plural; + int _wnid; friend class noun_query; @@ -17,6 +18,7 @@ namespace verbly { std::string base_form() const; std::string singular_form() const; std::string plural_form() const; + int wnid() const; bool has_plural_form() const; @@ -43,6 +45,8 @@ namespace verbly { adjective_query pertainyms() const; adjective_query variations() const; + std::string imagenet_url() const; + bool operator<(const noun& other) const; }; -- cgit 1.4.1