summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lingo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lingo.cpp b/lingo.cpp index 8f972e3..c2f36af 100644 --- a/lingo.cpp +++ b/lingo.cpp
@@ -427,7 +427,10 @@ private:
427 {kMiddle, kBlue}, 427 {kMiddle, kBlue},
428 }; 428 };
429 429
430 verbly::filter wordFilter = (verbly::form::proper == false); 430 verbly::filter wordFilter =
431 (verbly::form::proper == false) &&
432 (verbly::form::length >= 3) &&
433 (verbly::form::length <= 11);
431 434
432 verbly::filter cleanFilter = 435 verbly::filter cleanFilter =
433 !(verbly::word::usageDomains %= (verbly::notion::wnid == 106718862)) // ethnic slurs 436 !(verbly::word::usageDomains %= (verbly::notion::wnid == 106718862)) // ethnic slurs
@@ -500,7 +503,7 @@ private:
500 continue; 503 continue;
501 } 504 }
502 505
503 verbly::filter forwardFilter = cleanFilter && (verbly::form::proper == false); 506 verbly::filter forwardFilter = cleanFilter && wordFilter;
504 for (int i=0; i<static_cast<int>(kHeightCount); i++) { 507 for (int i=0; i<static_cast<int>(kHeightCount); i++) {
505 Height height = static_cast<Height>(i); 508 Height height = static_cast<Height>(i);
506 std::optional<Colour>& colour = parts[i]; 509 std::optional<Colour>& colour = parts[i];