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 b4336b6..8f37bf6 100644 --- a/lib/noun_query.cpp +++ b/lib/noun_query.cpp
@@ -104,6 +104,13 @@ namespace verbly {
104 return *this; 104 return *this;
105 } 105 }
106 106
107 noun_query& noun_query::requires_plural_form()
108 {
109 _requires_plural_form = true;
110
111 return *this;
112 }
113
107 noun_query& noun_query::with_complexity(int _arg) 114 noun_query& noun_query::with_complexity(int _arg)
108 { 115 {
109 _with_complexity = _arg; 116 _with_complexity = _arg;
@@ -560,6 +567,11 @@ namespace verbly {
560 } 567 }
561 } 568 }
562 569
570 if (_requires_plural_form)
571 {
572 conditions.push_back("plural IS NOT NULL");
573 }
574
563 if (!_with_prefix.empty()) 575 if (!_with_prefix.empty())
564 { 576 {
565 std::function<std::string (filter<std::string>, bool)> recur = [&] (filter<std::string> f, bool notlogic) -> std::string { 577 std::function<std::string (filter<std::string>, bool)> recur = [&] (filter<std::string> f, bool notlogic) -> std::string {