about summary refs log tree commit diff stats
path: root/furries.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-03-16 11:27:16 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-03-16 11:27:16 -0400
commit3aceae8ab1eb5992110ea57a9479bbc3177feb21 (patch)
tree13167a266805344efb7bb1d900486f782c23285e /furries.cpp
parente1be2716746e75cf6ed37e86461a7f580a964564 (diff)
downloadfurries-3aceae8ab1eb5992110ea57a9479bbc3177feb21.tar.gz
furries-3aceae8ab1eb5992110ea57a9479bbc3177feb21.tar.bz2
furries-3aceae8ab1eb5992110ea57a9479bbc3177feb21.zip
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.
Diffstat (limited to 'furries.cpp')
-rw-r--r--furries.cpp16
1 files changed, 8 insertions, 8 deletions
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 {
20 { 20 {
21 switch (it->token_type()) 21 switch (it->token_type())
22 { 22 {
23 case verbly::type::utterance: 23 case verbly::token::type::utterance:
24 { 24 {
25 auto& action = *dynamic_cast<verbly::utterance_token*>(it.get()); 25 auto& action = *dynamic_cast<verbly::utterance_token*>(it.get());
26 for (auto& tkn : action) 26 for (auto& tkn : action)
@@ -36,14 +36,14 @@ class fill_blanks {
36 break; 36 break;
37 } 37 }
38 38
39 case verbly::type::fillin: 39 case verbly::token::type::fillin:
40 { 40 {
41 auto& tkn = *dynamic_cast<verbly::fillin_token*>(it.get()); 41 auto& tkn = *dynamic_cast<verbly::fillin_token*>(it.get());
42 switch (tkn.fillin_type()) 42 switch (tkn.fillin_type())
43 { 43 {
44 case verbly::fillin_type::participle_phrase: 44 case verbly::fillin_type::participle_phrase:
45 { 45 {
46 const verbly::verb& v = database.verbs().random(true).limit(1).run().front(); 46 verbly::verb v = database.verbs().random(true).limit(1).run().front();
47 /*verbly::utterance_token phrase = verbly::random(v.frames).make_utterance(); 47 /*verbly::utterance_token phrase = verbly::random(v.frames).make_utterance();
48 while (std::begin(phrase)->token_type() != verbly::type::verb) 48 while (std::begin(phrase)->token_type() != verbly::type::verb)
49 { 49 {
@@ -53,7 +53,7 @@ class fill_blanks {
53 *std::begin(phrase) = verbly::verb_token(v).conjugate(verbly::conjugation::present_participle); 53 *std::begin(phrase) = verbly::verb_token(v).conjugate(verbly::conjugation::present_participle);
54 *it = phrase;*/ 54 *it = phrase;*/
55 auto avt = std::make_unique<verbly::verb_token>(v); 55 auto avt = std::make_unique<verbly::verb_token>(v);
56 avt->conjugate(verbly::conjugation::present_participle); 56 avt->inflect(verbly::verb_token::inflection::ing_form);
57 it = std::move(avt); 57 it = std::move(avt);
58 58
59 break; 59 break;
@@ -61,16 +61,16 @@ class fill_blanks {
61 61
62 case verbly::fillin_type::adjective: 62 case verbly::fillin_type::adjective:
63 { 63 {
64 const verbly::adjective& adj = database.adjectives().random(true).limit(1).run().front(); 64 verbly::adjective adj = database.adjectives().random(true).limit(1).run().front();
65 it = std::make_unique<verbly::string_token>(adj.form); 65 it = std::make_unique<verbly::string_token>(adj.base_form());
66 66
67 break; 67 break;
68 } 68 }
69 69
70 case verbly::fillin_type::adverb: 70 case verbly::fillin_type::adverb:
71 { 71 {
72 const verbly::adverb& adv = database.adverbs().random(true).limit(1).run().front(); 72 verbly::adverb adv = database.adverbs().random(true).limit(1).run().front();
73 it = std::make_unique<verbly::string_token>(adv.form); 73 it = std::make_unique<verbly::string_token>(adv.base_form());
74 74
75 break; 75 break;
76 } 76 }