From 3aceae8ab1eb5992110ea57a9479bbc3177feb21 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 16 Mar 2016 11:27:16 -0400 Subject: Added more inflections, word relationships, and pronunciations Nouns, adjectives, and adverbs now have inflected forms. A large number of WordNet word relationships (all noun-noun relationships, plus synonymy and antonymy for all word types except verbs) have been added. Additionally, CMUDICT is now being used to store word pronunciations for rhyming purposes. Verbly is now also a compiled library rather than being header-only due to the complexity of the query interface. --- furries.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'furries.cpp') diff --git a/furries.cpp b/furries.cpp index 0cce8bd..55dfb7b 100644 --- a/furries.cpp +++ b/furries.cpp @@ -20,7 +20,7 @@ class fill_blanks { { switch (it->token_type()) { - case verbly::type::utterance: + case verbly::token::type::utterance: { auto& action = *dynamic_cast(it.get()); for (auto& tkn : action) @@ -36,14 +36,14 @@ class fill_blanks { break; } - case verbly::type::fillin: + case verbly::token::type::fillin: { auto& tkn = *dynamic_cast(it.get()); switch (tkn.fillin_type()) { case verbly::fillin_type::participle_phrase: { - const verbly::verb& v = database.verbs().random(true).limit(1).run().front(); + verbly::verb v = database.verbs().random(true).limit(1).run().front(); /*verbly::utterance_token phrase = verbly::random(v.frames).make_utterance(); while (std::begin(phrase)->token_type() != verbly::type::verb) { @@ -53,7 +53,7 @@ class fill_blanks { *std::begin(phrase) = verbly::verb_token(v).conjugate(verbly::conjugation::present_participle); *it = phrase;*/ auto avt = std::make_unique(v); - avt->conjugate(verbly::conjugation::present_participle); + avt->inflect(verbly::verb_token::inflection::ing_form); it = std::move(avt); break; @@ -61,16 +61,16 @@ class fill_blanks { case verbly::fillin_type::adjective: { - const verbly::adjective& adj = database.adjectives().random(true).limit(1).run().front(); - it = std::make_unique(adj.form); + verbly::adjective adj = database.adjectives().random(true).limit(1).run().front(); + it = std::make_unique(adj.base_form()); break; } case verbly::fillin_type::adverb: { - const verbly::adverb& adv = database.adverbs().random(true).limit(1).run().front(); - it = std::make_unique(adv.form); + verbly::adverb adv = database.adverbs().random(true).limit(1).run().front(); + it = std::make_unique(adv.base_form()); break; } -- cgit 1.4.1