diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-10 21:34:55 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-10 21:34:55 -0500 |
commit | e1be2716746e75cf6ed37e86461a7f580a964564 (patch) | |
tree | 38a69a8cbd690f27f1ee8c2ce43eeb0333753d52 /furries.cpp | |
parent | 41decb9a671e4d0fbbe12533372435ec6ede2246 (diff) | |
download | furries-e1be2716746e75cf6ed37e86461a7f580a964564.tar.gz furries-e1be2716746e75cf6ed37e86461a7f580a964564.tar.bz2 furries-e1be2716746e75cf6ed37e86461a7f580a964564.zip |
Started implementing verbly data generator
Currently, the generator: - Uses AGID to create entries for verb words and their inflections - Uses WordNet to create entries for adjective, adverb, and noun senses
Diffstat (limited to 'furries.cpp')
-rw-r--r-- | furries.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/furries.cpp b/furries.cpp index 2d0fb23..0cce8bd 100644 --- a/furries.cpp +++ b/furries.cpp | |||
@@ -62,7 +62,15 @@ class fill_blanks { | |||
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 | const verbly::adjective& adj = database.adjectives().random(true).limit(1).run().front(); |
65 | it = std::make_unique<verbly::string_token>(adj.value); | 65 | it = std::make_unique<verbly::string_token>(adj.form); |
66 | |||
67 | break; | ||
68 | } | ||
69 | |||
70 | case verbly::fillin_type::adverb: | ||
71 | { | ||
72 | const verbly::adverb& adv = database.adverbs().random(true).limit(1).run().front(); | ||
73 | it = std::make_unique<verbly::string_token>(adv.form); | ||
66 | 74 | ||
67 | break; | 75 | break; |
68 | } | 76 | } |
@@ -110,6 +118,11 @@ int main(int argc, char** argv) | |||
110 | new verbly::string_token("the furries are"), | 118 | new verbly::string_token("the furries are"), |
111 | new verbly::fillin_token(verbly::fillin_type::adjective) | 119 | new verbly::fillin_token(verbly::fillin_type::adjective) |
112 | }); | 120 | }); |
121 | forms.push_back({ | ||
122 | new verbly::string_token("the furries are"), | ||
123 | new verbly::fillin_token(verbly::fillin_type::adverb), | ||
124 | new verbly::fillin_token(verbly::fillin_type::adjective) | ||
125 | }); | ||
113 | 126 | ||
114 | verbly::data database {"data.sqlite3"}; | 127 | verbly::data database {"data.sqlite3"}; |
115 | fill_blanks yeah {database}; | 128 | fill_blanks yeah {database}; |