diff options
Diffstat (limited to 'chemist.cpp')
-rw-r--r-- | chemist.cpp | 4 |
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()]; |