diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-27 14:30:14 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-27 14:30:14 -0400 |
commit | b8e28a7bf24425e82defab415faf1d6cca9535f7 (patch) | |
tree | 281b3fa62dd5fb562c538079c8ae3863240df085 /chemist.cpp | |
parent | 1b33b4c5fe509b6f516b906f4dcf6f0c91de1370 (diff) | |
download | chemist-b8e28a7bf24425e82defab415faf1d6cca9535f7.tar.gz chemist-b8e28a7bf24425e82defab415faf1d6cca9535f7.tar.bz2 chemist-b8e28a7bf24425e82defab415faf1d6cca9535f7.zip |
Restricted word complexity, and tweaked the data
Diffstat (limited to 'chemist.cpp')
-rw-r--r-- | chemist.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chemist.cpp b/chemist.cpp index 05cfac0..07120f8 100644 --- a/chemist.cpp +++ b/chemist.cpp | |||
@@ -75,10 +75,10 @@ int main(int argc, char** argv) | |||
75 | std::string result; | 75 | std::string result; |
76 | if (canontkn == "NOUN") | 76 | if (canontkn == "NOUN") |
77 | { | 77 | { |
78 | result = database.nouns().is_not_proper().random().limit(1).run().front().singular_form(); | 78 | result = database.nouns().is_not_proper().random().limit(1).with_complexity(1).run().front().singular_form(); |
79 | } else if (canontkn == "ADJECTIVE") | 79 | } else if (canontkn == "ADJECTIVE") |
80 | { | 80 | { |
81 | result = database.adjectives().random().limit(1).run().front().base_form(); | 81 | result = database.adjectives().with_complexity(1).random().limit(1).run().front().base_form(); |
82 | } else if (canontkn == "VERBING") | 82 | } else if (canontkn == "VERBING") |
83 | { | 83 | { |
84 | result = database.verbs().random().limit(1).run().front().ing_form(); | 84 | result = database.verbs().random().limit(1).run().front().ing_form(); |
@@ -101,7 +101,7 @@ int main(int argc, char** argv) | |||
101 | } else if (canontkn == "BODYPART") | 101 | } else if (canontkn == "BODYPART") |
102 | { | 102 | { |
103 | auto bp = database.nouns().with_singular_form("body part").limit(1).run().front(); | 103 | auto bp = database.nouns().with_singular_form("body part").limit(1).run().front(); |
104 | result = database.nouns().full_hyponym_of({bp}).random().limit(1).run().front().singular_form(); | 104 | result = database.nouns().full_hyponym_of({bp}).with_complexity(1).random().limit(1).run().front().singular_form(); |
105 | } else { | 105 | } else { |
106 | auto group = groups[canontkn]; | 106 | auto group = groups[canontkn]; |
107 | result = group[rand() % group.size()]; | 107 | result = group[rand() % group.size()]; |