summary refs log tree commit diff stats
path: root/chemist.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-03-26 15:37:44 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-03-26 15:37:44 -0400
commit70d6fc90ef683dd3e1f83a6432a662304f6ff5dc (patch)
tree91e9a737d9bdea15106337b81a9284fbacb896fb /chemist.cpp
parentce7f42f1f3a45b9167a9cc4e85e1bc4488013c70 (diff)
downloadinsult-70d6fc90ef683dd3e1f83a6432a662304f6ff5dc.tar.gz
insult-70d6fc90ef683dd3e1f83a6432a662304f6ff5dc.tar.bz2
insult-70d6fc90ef683dd3e1f83a6432a662304f6ff5dc.zip
Added some more data
Diffstat (limited to 'chemist.cpp')
-rw-r--r--chemist.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/chemist.cpp b/chemist.cpp index a111931..05cfac0 100644 --- a/chemist.cpp +++ b/chemist.cpp
@@ -98,6 +98,10 @@ int main(int argc, char** argv)
98 auto person = database.nouns().with_singular_form("person").limit(1).run().front(); 98 auto person = database.nouns().with_singular_form("person").limit(1).run().front();
99 auto ptypes = database.nouns().full_hyponym_of({person}).is_class().random().limit(1).run().front(); 99 auto ptypes = database.nouns().full_hyponym_of({person}).is_class().random().limit(1).run().front();
100 result = database.nouns().instance_of({ptypes}).random().limit(1).run().front().singular_form(); 100 result = database.nouns().instance_of({ptypes}).random().limit(1).run().front().singular_form();
101 } else if (canontkn == "BODYPART")
102 {
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();
101 } else { 105 } else {
102 auto group = groups[canontkn]; 106 auto group = groups[canontkn];
103 result = group[rand() % group.size()]; 107 result = group[rand() % group.size()];