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/adjective_query.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/adjective_query.h') diff --git a/lib/adjective_query.h b/lib/adjective_query.h index b2859dc..030a494 100644 --- a/lib/adjective_query.h +++ b/lib/adjective_query.h @@ -12,6 +12,10 @@ namespace verbly { adjective_query& except(const adjective& _word); adjective_query& rhymes_with(const word& _word); adjective_query& has_pronunciation(); + adjective_query& has_rhyming_noun(); + adjective_query& has_rhyming_adjective(); + adjective_query& has_rhyming_adverb(); + adjective_query& has_rhyming_verb(); adjective_query& requires_comparative_form(); adjective_query& requires_superlative_form(); @@ -54,9 +58,13 @@ 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_rhyming_noun = false; + bool _has_rhyming_adjective = false; + bool _has_rhyming_adverb = false; + bool _has_rhyming_verb = false; bool _requires_comparative_form = false; bool _requires_superlative_form = false; -- cgit 1.4.1