diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-17 13:44:37 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-17 13:44:37 -0400 |
commit | 04338f2b040fee5142904c062e0e38c836601034 (patch) | |
tree | a3ca42f738839ae4f6c83d599277c33203beb733 /lib/noun_query.h | |
parent | 040ee58fecdc9c478004bc2e554e1ae126ec4602 (diff) | |
download | verbly-04338f2b040fee5142904c062e0e38c836601034.tar.gz verbly-04338f2b040fee5142904c062e0e38c836601034.tar.bz2 verbly-04338f2b040fee5142904c062e0e38c836601034.zip |
Fixed perfect rhyming
Rhyme detection now ensures that any rhymes it finds are perfect rhymes and not identical rhymes. Rhyme detection is also now a lot faster because additional information is stored in the datafile. Also fixed a bug in the query interface (and the generator) that could cause incorrect queries to be executed.
Diffstat (limited to 'lib/noun_query.h')
-rw-r--r-- | lib/noun_query.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/noun_query.h b/lib/noun_query.h index 8768f5d..6b5733f 100644 --- a/lib/noun_query.h +++ b/lib/noun_query.h | |||
@@ -12,6 +12,10 @@ namespace verbly { | |||
12 | noun_query& except(const noun& _word); | 12 | noun_query& except(const noun& _word); |
13 | noun_query& rhymes_with(const word& _word); | 13 | noun_query& rhymes_with(const word& _word); |
14 | noun_query& has_pronunciation(); | 14 | noun_query& has_pronunciation(); |
15 | noun_query& has_rhyming_noun(); | ||
16 | noun_query& has_rhyming_adjective(); | ||
17 | noun_query& has_rhyming_adverb(); | ||
18 | noun_query& has_rhyming_verb(); | ||
15 | 19 | ||
16 | noun_query& with_singular_form(std::string _arg); | 20 | noun_query& with_singular_form(std::string _arg); |
17 | noun_query& with_prefix(filter<std::string> _f); | 21 | noun_query& with_prefix(filter<std::string> _f); |
@@ -86,9 +90,13 @@ namespace verbly { | |||
86 | const data& _data; | 90 | const data& _data; |
87 | int _limit = unlimited; | 91 | int _limit = unlimited; |
88 | bool _random = false; | 92 | bool _random = false; |
89 | std::list<std::string> _rhymes; | 93 | std::list<rhyme> _rhymes; |
90 | std::list<noun> _except; | 94 | std::list<noun> _except; |
91 | bool _has_prn = false; | 95 | bool _has_prn = false; |
96 | bool _has_rhyming_noun = false; | ||
97 | bool _has_rhyming_adjective = false; | ||
98 | bool _has_rhyming_adverb = false; | ||
99 | bool _has_rhyming_verb = false; | ||
92 | 100 | ||
93 | std::list<std::string> _with_singular_form; | 101 | std::list<std::string> _with_singular_form; |
94 | filter<std::string> _with_prefix; | 102 | filter<std::string> _with_prefix; |