From b8e28a7bf24425e82defab415faf1d6cca9535f7 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 27 Mar 2016 14:30:14 -0400 Subject: Restricted word complexity, and tweaked the data --- chemist.cpp | 6 ++--- data.txt | 73 ++++++++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 28 deletions(-) diff --git a/chemist.cpp b/chemist.cpp index 05cfac0..07120f8 100644 --- a/chemist.cpp +++ b/chemist.cpp @@ -75,10 +75,10 @@ int main(int argc, char** argv) std::string result; if (canontkn == "NOUN") { - result = database.nouns().is_not_proper().random().limit(1).run().front().singular_form(); + result = database.nouns().is_not_proper().random().limit(1).with_complexity(1).run().front().singular_form(); } else if (canontkn == "ADJECTIVE") { - result = database.adjectives().random().limit(1).run().front().base_form(); + result = database.adjectives().with_complexity(1).random().limit(1).run().front().base_form(); } else if (canontkn == "VERBING") { result = database.verbs().random().limit(1).run().front().ing_form(); @@ -101,7 +101,7 @@ int main(int argc, char** argv) } else if (canontkn == "BODYPART") { auto bp = database.nouns().with_singular_form("body part").limit(1).run().front(); - result = database.nouns().full_hyponym_of({bp}).random().limit(1).run().front().singular_form(); + result = database.nouns().full_hyponym_of({bp}).with_complexity(1).random().limit(1).run().front().singular_form(); } else { auto group = groups[canontkn]; result = group[rand() % group.size()]; diff --git a/data.txt b/data.txt index a98e594..8535d4e 100644 --- a/data.txt +++ b/data.txt @@ -2,41 +2,44 @@ MAIN {PRIMARY} {SECONDARY} PRIMARY -{NAME} is {CLASS:indefinite} commonly used to treat {syndrome}. -{NAME} is {CLASS:indefinite} primarily used for {syndrome}. -{NAME} is {CLASS:indefinite} prescribed for {syndrome}. -{NAME} is {CLASS:indefinite} approved for treatment of {syndrome}, {syndrome}, and {syndrome}. -{NAME} is {CLASS:indefinite} used for {syndrome} and {syndrome}. -{NAME} is {CLASS:indefinite} used with {existent} to treat {syndrome}. +{NAME} is {CLASS:indefinite} commonly used to treat {SYNDROME}. +{NAME} is {CLASS:indefinite} primarily used for {SYNDROME}. +{NAME} is {CLASS:indefinite} prescribed for {SYNDROME}. +{NAME} is {CLASS:indefinite} approved for treatment of {SYNDROME}, and {SYNDROME}. +{NAME} is {CLASS:indefinite} used for {SYNDROME} and {SYNDROME}. +{NAME} is {CLASS:indefinite} used with {EXISTENT} to treat {syndrome}. {NAME} is {CLASS:indefinite} used in cases of {EXISTENT} overdose. {NAME} is {CLASS:indefinite} used recreationally as {CLASS:indefinite}. +{NAME} is {CLASS:indefinite} used recreationally for {verbing}. SECONDARY -Developed in {year} due to the Great {Noun} Epidemic in {Region}. -Frequently prescribed off-label for {syndrome}. -Sometimes used for {syndrome} because of its {verbing} effect. +Developed due to the Great {Noun} Epidemic of {year} in {Region}. +Frequently prescribed off-label for {SYNDROME}. +Sometimes used for {SYNDROME} because of its {verbing} effect. Illegal to own in the US because of its {verbing} effect. Developed in {year} to replace {EXISTENT}. -Overtook {EXISTENT} as the primary treatment, having fewer side effects. +Overtook {EXISTENT} due to its {adjective} effect. Synthesized by {FamousName} in {year} in a {verbing} accident. Used mainly in {year}, before {EXISTENT} became popular. Only legal in {Region} because of its {verbing} effect. SYNDROME -Irritable {Noun} Syndrome -{Adjective} {Noun} Syndrome -Severe {Noun} -Major {Adjective} Disorder -{Adjective} {Noun} Disorder -Obsessive {Noun} Disorder -Clinical {Noun} -{Adjective} Personality Disorder -Respiratory {Adjective} Disease -{Bodypart} Cancer -Restless {Bodypart} -{Bodypart} Failure -Congenital {Noun} Disease +irritable {noun} syndrome +{adjective} {noun} syndrome +severe {noun} +major {adjective} disorder +{adjective} {noun} disorder +obsessive {noun} disorder +clinical {noun} +{adjective} personality disorder +respiratory {adjective} disease +{bodypart} cancer +restless {bodypart} +{bodypart} failure +congenital {noun} disease {FamousName}'s disease +{adjective} fever +hypo{noun}ism CLASS analgesic @@ -60,7 +63,7 @@ antifungal anti-infective anti-inflammatory disinfectant -antispetic +antiseptic antiemetic diuretic opiod painkiller @@ -182,6 +185,17 @@ Estra Du Bus Epin +Co +Lido +Pro +Pri +Bu +Levo +Ro +Me +Dibu +Des +Ha NAMEMID pipra @@ -208,6 +222,12 @@ thi loxe con epher +piva +bupi +va +piva +flu +oxy {NAMEMID}{NAMEMID} {NAMEMID}{NAMEMID} @@ -234,4 +254,7 @@ um diol tin rone -ine \ No newline at end of file +ine +caine +rane +ide \ No newline at end of file -- cgit 1.4.1