summary refs log tree commit diff stats
path: root/lib/data.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/data.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/data.h')
-rw-r--r--lib/data.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/data.h b/lib/data.h index 0d599c4..b8b12b9 100644 --- a/lib/data.h +++ b/lib/data.h
@@ -343,6 +343,38 @@ namespace verbly {
343 }; 343 };
344 }; 344 };
345 345
346 class binding {
347 public:
348 enum class type {
349 integer,
350 string
351 };
352
353 type get_type() const;
354 binding(const binding& other);
355 ~binding();
356 binding& operator=(const binding& other);
357
358 // Integer
359 binding(int _arg);
360 int get_integer() const;
361 void set_integer(int _arg);
362 binding& operator=(int _arg);
363
364 // String
365 binding(std::string _arg);
366 std::string get_string() const;
367 void set_string(std::string _arg);
368 binding& operator=(std::string _arg);
369
370 private:
371 union {
372 int _integer;
373 std::string _string;
374 };
375 type _type;
376 };
377
346}; 378};
347 379
348#endif /* end of include guard: DATA_H_C4AEC3DD */ 380#endif /* end of include guard: DATA_H_C4AEC3DD */