diff options
| -rw-r--r-- | blessed.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
| diff --git a/blessed.cpp b/blessed.cpp index 02f4273..c8041d0 100644 --- a/blessed.cpp +++ b/blessed.cpp | |||
| @@ -57,15 +57,20 @@ int main(int argc, char** argv) | |||
| 57 | std::uniform_int_distribution<int> emojidist(0, emojis.size()-1); | 57 | std::uniform_int_distribution<int> emojidist(0, emojis.size()-1); |
| 58 | std::bernoulli_distribution continuedist(1.0/2.0); | 58 | std::bernoulli_distribution continuedist(1.0/2.0); |
| 59 | 59 | ||
| 60 | verbly::filter slurFilter = | ||
| 61 | (verbly::word::usageDomains %= (verbly::notion::wnid == 106717170)); | ||
| 62 | |||
| 60 | verbly::filter nounFilter = | 63 | verbly::filter nounFilter = |
| 61 | (verbly::notion::partOfSpeech == verbly::part_of_speech::noun) | 64 | (verbly::notion::partOfSpeech == verbly::part_of_speech::noun) |
| 62 | && (verbly::form::proper == false) | 65 | && (verbly::form::proper == false) |
| 63 | // Blacklist ethnic slurs | 66 | // Blacklist slurs and slur homographys |
| 64 | && !(verbly::word::usageDomains %= (verbly::notion::wnid == 106718862)); | 67 | && !(verbly::word::forms(verbly::inflection::base) %= slurFilter);; |
| 65 | 68 | ||
| 66 | verbly::query<verbly::word> verbQuery = database.words( | 69 | verbly::query<verbly::word> verbQuery = database.words( |
| 67 | (verbly::notion::partOfSpeech == verbly::part_of_speech::verb) | 70 | (verbly::notion::partOfSpeech == verbly::part_of_speech::verb) |
| 68 | && (verbly::pronunciation::rhymes %= nounFilter)); | 71 | && (verbly::pronunciation::rhymes %= nounFilter) |
| 72 | // Blacklist slurs and slur homographys | ||
| 73 | && !(verbly::word::forms(verbly::inflection::base) %= slurFilter)); | ||
| 69 | 74 | ||
| 70 | for (;;) | 75 | for (;;) |
| 71 | { | 76 | { |
