From 02c187fd3141203024b6f359ec714c0b804583c0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 19 Mar 2016 14:40:21 -0400 Subject: Nouns with any uppercase letters are now considered proper --- lib/noun.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lib/noun.cpp') diff --git a/lib/noun.cpp b/lib/noun.cpp index 43fda2e..81e6613 100644 --- a/lib/noun.cpp +++ b/lib/noun.cpp @@ -330,6 +330,13 @@ namespace verbly { return *this; } + noun_query& noun_query::is_instance(bool _arg) + { + _is_instance = _arg; + + return *this; + } + noun_query& noun_query::instance_of(const noun& _noun) { _instance_of.push_back(_noun); @@ -644,12 +651,17 @@ namespace verbly { if (_is_proper) { - conditions.push_back("noun_id IN (SELECT instance_id FROM instantiation)"); + conditions.push_back("proper = 1"); } if (_is_not_proper) { - conditions.push_back("noun_id NOT IN (SELECT instance_id FROM instantiation)"); + conditions.push_back("proper = 0"); + } + + if (_is_instance) + { + conditions.push_back("noun_id IN (SELECT instance_id FROM instantiation)"); } if (!_instance_of.empty()) -- cgit 1.4.1