summary refs log tree commit diff stats
path: root/lib/noun_query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/noun_query.cpp')
-rw-r--r--lib/noun_query.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/noun_query.cpp b/lib/noun_query.cpp index 83bb47d..04e567d 100644 --- a/lib/noun_query.cpp +++ b/lib/noun_query.cpp
@@ -76,6 +76,13 @@ namespace verbly {
76 return *this; 76 return *this;
77 } 77 }
78 78
79 noun_query& noun_query::requires_plural_form()
80 {
81 _requires_plural_form = true;
82
83 return *this;
84 }
85
79 noun_query& noun_query::with_complexity(int _arg) 86 noun_query& noun_query::with_complexity(int _arg)
80 { 87 {
81 _with_complexity = _arg; 88 _with_complexity = _arg;
@@ -484,6 +491,11 @@ namespace verbly {
484 conditions.push_back(cond); 491 conditions.push_back(cond);
485 } 492 }
486 493
494 if (_requires_plural_form)
495 {
496 conditions.push_back("plural IS NOT NULL");
497 }
498
487 if (!_with_prefix.empty()) 499 if (!_with_prefix.empty())
488 { 500 {
489 std::function<std::string (filter<std::string>, bool)> recur = [&] (filter<std::string> f, bool notlogic) -> std::string { 501 std::function<std::string (filter<std::string>, bool)> recur = [&] (filter<std::string> f, bool notlogic) -> std::string {