diff options
-rw-r--r-- | nancy.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/nancy.cpp b/nancy.cpp index 00c68c5..6a89061 100644 --- a/nancy.cpp +++ b/nancy.cpp | |||
@@ -91,18 +91,8 @@ int main(int argc, char** argv) | |||
91 | // Nouns | 91 | // Nouns |
92 | while ((i = form.find("{noun}")) != std::string::npos) | 92 | while ((i = form.find("{noun}")) != std::string::npos) |
93 | { | 93 | { |
94 | std::string nf; | 94 | verbly::noun n = database.nouns().is_not_proper(true).random(true).limit(1).run().front(); |
95 | for (;;) | 95 | form.replace(i, 6, capitalize(n.singular_form())); |
96 | { | ||
97 | verbly::noun n = database.nouns().is_not_proper(true).random(true).limit(1).run().front(); | ||
98 | if (n.singular_form().find("genus") == std::string::npos) | ||
99 | { | ||
100 | nf = n.singular_form(); | ||
101 | break; | ||
102 | } | ||
103 | } | ||
104 | |||
105 | form.replace(i, 6, capitalize(nf)); | ||
106 | } | 96 | } |
107 | 97 | ||
108 | if (form.size() > 140) | 98 | if (form.size() > 140) |