public void MaryJillAndAnitaHaveRedHair() => Assert.AreEqual("Mary, Jill and Anita have red hair.", Client.Realize(new SPhraseSpec { subj = new NLGElement[] { new CoordinatedPhraseElement { conj = "and", coord = new NLGElement[] { Word.Noun("Mary").SetProper(true), Word.Noun("Jill").SetProper(true), Word.Noun("Anita").SetProper(true) } } }, vp = new VPPhraseSpec { Head = Word.Verb("have"), Tense = tense.PRESENT, compl = new NLGElement[] { new NPPhraseSpec { Head = Word.Noun("hair"), PreModifiers = new NLGElement[] { Word.Adjective("red") } } } } }));
public void EvolutionGoneHorriblyWrong() { string realized = Client.Realize(new NPPhraseSpec { Head = Word.Noun("evolution"), PostModifiers = new NLGElement[] { new VPPhraseSpec { Form = form.PAST_PARTICIPLE, Head = Word.Verb("go"), PostModifiers = new NLGElement[] { new AdjPhraseSpec { PreModifiers = new NLGElement[] { Word.Adverb("horribly") }, Head = Word.Adjective("wrong") } } } } }); Assert.AreEqual("Evolution gone horribly wrong.", realized); }
public void TallMan() => Assert.AreEqual("Tall man.", Client.Realize(new NPPhraseSpec { head = Word.Noun("man"), PreModifiers = new NLGElement[] { Word.Adjective("tall") } }));
public void AnAwfulSituation() => Assert.AreEqual("An awful situation.", Client.Realize(new NPPhraseSpec { Head = Word.Noun("situation"), Specifier = Word.Determiner("a"), PreModifiers = new NLGElement[] { Word.Adjective("awful") } }));
public void LootingAndPillagingArePopularActivitiesAmongMyPeople() => Assert.AreEqual("Looting and pillaging are popular activities among my people.", Client.Realize(new SPhraseSpec { subj = new NLGElement[] { new CoordinatedPhraseElement { Conjunction = "and", coord = new NLGElement[] { new VPPhraseSpec { Head = Word.Verb("loot"), Form = form.GERUND }, new VPPhraseSpec { Head = Word.Verb("pillage"), Form = form.GERUND } } } }, vp = new VPPhraseSpec { Head = Word.Verb("are"), Tense = tense.PRESENT, compl = new NLGElement[] { new NPPhraseSpec { Head = Word.Noun("activities"), PreModifiers = new NLGElement[] { Word.Adjective("popular") } }, new PPPhraseSpec { Head = Word.Preposition("among"), Complements = new NLGElement[] { new NPPhraseSpec { Specifier = new NPPhraseSpec { Head = Word.Pronoun("me"), Possessive = true }, Head = Word.Noun("people") } } } } } }));
public void CoordinatedComplement() => Assert.AreEqual("Greg is an incompetent fool, an imbecile and a wildly mendacious narcissist.", Client.Realize(new SPhraseSpec { Form = form.NORMAL, Tense = tense.PRESENT, subj = new NLGElement[] { Word.Noun("greg").SetProper(true) }, vp = new VPPhraseSpec { head = Word.Verb("be"), compl = new NLGElement[] { new CoordinatedPhraseElement { conj = "and", coord = new NLGElement[] { new NPPhraseSpec { preMod = new NLGElement[] { Word.Adjective("incompetent") }, head = Word.Noun("fool"), spec = Word.Determiner("a") }, new NPPhraseSpec { head = Word.Noun("imbecile"), spec = Word.Determiner("a") }, new NPPhraseSpec { preMod = new NLGElement[] { new AdjPhraseSpec { head = Word.Adjective("mendacious"), preMod = new NLGElement[] { Word.Adverb("wildly") } } }, head = Word.Noun("narcissist"), spec = Word.Determiner("a") } } } } } }));
public void UtterlyAtrocious() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("atrocious"), PreModifiers = new NLGElement[] { Phrase.Adverb("utterly") } }); Assert.AreEqual("Utterly atrocious.", realized); }
public void MuchBetter() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("better"), PreModifiers = new NLGElement[] { Word.Adverb("much") } }); Assert.AreEqual("Much better.", realized); }
public void Expensive() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("expensive"), PreModifiers = new NLGElement[] { Phrase.Adverb("most") } }); Assert.AreEqual("Most expensive.", realized); }
public void Rounded() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("rounded"), PreModifiers = new NLGElement[] { Phrase.Adverb("more") } }); Assert.AreEqual("More rounded.", realized); }
public void Important() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("important"), PreModifiers = new NLGElement[] { Phrase.Adverb("more") } }); Assert.AreEqual("More important.", realized); }
public void BeautifulAndTalented() { string realized = Client.Realize(new CoordinatedPhraseElement { conj = "and", coord = new NLGElement[] { Word.Adjective("beautiful"), Word.Adjective("talented") } }); Assert.AreEqual("beautiful and talented", realized); }
public void AnExtremelyBadSituation() => Assert.AreEqual("A extremely bad situation.", Client.Realize(new NPPhraseSpec { Head = Word.Noun("situation"), Specifier = Word.Determiner("a"), PreModifiers = new NLGElement[] { new AdjPhraseSpec { Head = Word.Adjective("bad"), PreModifiers = new NLGElement[] { Word.Adverb("extremely") } } } }));
public void AMuchTallerBuilding() => Assert.AreEqual("A much taller building.", Client.Realize(new NPPhraseSpec { head = Word.Noun("building"), spec = Word.Determiner("a"), PreModifiers = new NLGElement[] { new AdjPhraseSpec { head = Word.Adjective("tall"), Comparative = true, preMod = new NLGElement[] { Word.Adverb("much") } } } }));
public void AMorePefectUnion() => Assert.AreEqual("A more perfect union.", Client.Realize(new NPPhraseSpec { head = Word.Noun("union"), spec = Word.Determiner("a"), PreModifiers = new NLGElement[] { new AdjPhraseSpec { head = Word.Adjective("perfect"), preMod = new NLGElement[] { new AdvPhraseSpec { head = Word.Adverb("more") } } } } }));
public void CitizensAreAngryWithTheHighPrices() => Assert.AreEqual("Citizens are angry with the high prices.", Client.Realize(new SPhraseSpec { subj = new NLGElement[] { new NPPhraseSpec { Head = Word.Noun("citizen"), Number = numberAgreement.PLURAL } }, vp = new VPPhraseSpec { Head = Word.Verb("are"), compl = new NLGElement[] { new AdjPhraseSpec { Head = Word.Adjective("angry"), Complements = new NLGElement[] { new PPPhraseSpec { Head = Word.Preposition("with"), Complements = new NLGElement[] { new NPPhraseSpec { Specifier = Word.Determiner("the"), Head = Word.Noun("prices"), PreModifiers = new NLGElement[] { Word.Adjective("high") } } } } } } }, } }));
public void CompletelyAndTotallyIncompetent() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("incompetent"), PreModifiers = new NLGElement[] { new CoordinatedPhraseElement { Conjunction = "and", coord = new NLGElement[] { Word.Adverb("completely"), Word.Adverb("totally") } } } }); Assert.AreEqual("Completely and totally incompetent.", realized); }
public void MoreBeautifulAndTalented() { string realized = Client.Realize(new CoordinatedPhraseElement { Category = phraseCategory.ADJECTIVE_PHRASE, conj = "and", coord = new NLGElement[] { new AdjPhraseSpec { Head = Word.Adjective("beautiful"), preMod = new NLGElement[] { Word.Adverb("more") } }, Word.Adjective("talented") } }); Assert.AreEqual("More beautiful and talented.", realized); }
public void MostIncompetentAndCorrupt() { string realized = Client.Realize(new CoordinatedPhraseElement { Category = phraseCategory.ADJECTIVE_PHRASE, conj = "and", coord = new NLGElement[] { new AdjPhraseSpec { Head = Word.Adjective("incompetent"), preMod = new NLGElement[] { Word.Adverb("most") } }, Word.Adjective("corrupt") } }); Assert.AreEqual("Most incompetent and corrupt.", realized); }
public void AMuchMoreImportantAndUltimatelyDecisiveFactor() => Assert.AreEqual("A much more important and ultimately decisive factor.", Client.Realize(new NPPhraseSpec { head = Word.Noun("factor"), spec = Word.Determiner("a"), PreModifiers = new NLGElement[] { new CoordinatedPhraseElement { conj = "and", coord = new NLGElement[] { new AdjPhraseSpec { head = Word.Adjective("important"), preMod = new NLGElement[] { new AdvPhraseSpec { head = Word.Adverb("more"), preMod = new NLGElement[] { Word.Adverb("much") } } } }, new AdjPhraseSpec { head = Word.Adjective("decisive"), preMod = new NLGElement[] { Word.Adverb("ultimately") } } } }, } }));
public void GregIsBad() => Assert.AreEqual("Greg is bad.", Client.Realize(new SPhraseSpec { Form = form.NORMAL, Tense = tense.PRESENT, subj = new NLGElement[] { new NPPhraseSpec { head = Word.Noun("greg").SetProper(true) } }, vp = new VPPhraseSpec { head = Word.Verb("be"), compl = new NLGElement[] { new AdjPhraseSpec { head = Word.Adjective("bad") } } } }));
public void AMuchMoreAmusingJoke() => Assert.AreEqual("A much more amusing joke.", Client.Realize(new NPPhraseSpec { head = Word.Noun("joke"), spec = Word.Determiner("a"), PreModifiers = new NLGElement[] { new AdjPhraseSpec { head = Word.Adjective("amusing"), preMod = new NLGElement[] { new AdvPhraseSpec { head = Word.Adverb("more"), preMod = new NLGElement[] { Word.Adverb("much") } } } } } }));
private static string ComparativeFormOf(string adjective) => Client.Realize(new AdjPhraseSpec { head = Word.Adjective(adjective), Comparative = true });
public static AdjPhraseSpec Adjective(string headWord) => new AdjPhraseSpec { head = Word.Adjective(headWord) };