summary refs log tree commit diff stats
path: root/lib/noun.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-04-15 17:24:44 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-04-15 17:24:44 -0400
commit040ee58fecdc9c478004bc2e554e1ae126ec4602 (patch)
tree672a75690952ba8055ab9765ba0a475e056e35d4 /lib/noun.h
parent3a225f5eb709262b9d44d49519136ea9a2a71000 (diff)
downloadverbly-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.h')
-rw-r--r--lib/noun.h4
1 files changed, 4 insertions, 0 deletions
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 {
7 private: 7 private:
8 std::string _singular; 8 std::string _singular;
9 std::string _plural; 9 std::string _plural;
10 int _wnid;
10 11
11 friend class noun_query; 12 friend class noun_query;
12 13
@@ -17,6 +18,7 @@ namespace verbly {
17 std::string base_form() const; 18 std::string base_form() const;
18 std::string singular_form() const; 19 std::string singular_form() const;
19 std::string plural_form() const; 20 std::string plural_form() const;
21 int wnid() const;
20 22
21 bool has_plural_form() const; 23 bool has_plural_form() const;
22 24
@@ -43,6 +45,8 @@ namespace verbly {
43 adjective_query pertainyms() const; 45 adjective_query pertainyms() const;
44 adjective_query variations() const; 46 adjective_query variations() const;
45 47
48 std::string imagenet_url() const;
49
46 bool operator<(const noun& other) const; 50 bool operator<(const noun& other) const;
47 }; 51 };
48 52