From 04338f2b040fee5142904c062e0e38c836601034 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 17 Apr 2016 13:44:37 -0400 Subject: 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. --- lib/verb_query.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/verb_query.h') diff --git a/lib/verb_query.h b/lib/verb_query.h index 24f5732..a07dc18 100644 --- a/lib/verb_query.h +++ b/lib/verb_query.h @@ -12,6 +12,10 @@ namespace verbly { verb_query& except(const verb& _word); verb_query& rhymes_with(const word& _word); verb_query& has_pronunciation(); + verb_query& has_rhyming_noun(); + verb_query& has_rhyming_adjective(); + verb_query& has_rhyming_adverb(); + verb_query& has_rhyming_verb(); verb_query& has_frames(); @@ -23,10 +27,14 @@ namespace verbly { const data& _data; int _limit = unlimited; bool _random = false; - std::list _rhymes; + std::list _rhymes; std::list _except; bool _has_prn = false; bool _has_frames = false; + bool _has_rhyming_noun = false; + bool _has_rhyming_adjective = false; + bool _has_rhyming_adverb = false; + bool _has_rhyming_verb = false; }; }; -- cgit 1.4.1