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 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 MuchBetter() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("better"), PreModifiers = new NLGElement[] { Word.Adverb("much") } }); Assert.AreEqual("Much better.", realized); }
public void DroveAway() { string realized = Client.Realize(new VPPhraseSpec { Tense = tense.PAST, Head = Word.Verb("drive"), PostModifiers = new NLGElement[] { Word.Adverb("away") } }); Assert.AreEqual("Drove away.", realized); }
public void StartsOut() { string realized = Client.Realize(new VPPhraseSpec { Tense = tense.PRESENT, Head = Word.Verb("start"), PostModifiers = new NLGElement[] { Word.Adverb("out") } }); Assert.AreEqual("Starts out.", realized); }
public void LookedUp() { string realized = Client.Realize(new VPPhraseSpec { Tense = tense.PAST, Head = Word.Verb("look"), PostModifiers = new NLGElement[] { Word.Adverb("up") } }); Assert.AreEqual("Looked up.", realized); }
public void TakingOff() { string realized = Client.Realize(new VPPhraseSpec { Tense = tense.PRESENT, Form = form.PRESENT_PARTICIPLE, Head = Word.Verb("take"), PostModifiers = new NLGElement[] { Word.Adverb("off") } }); Assert.AreEqual("Taking off.", 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 WayMoreImportant() { string realized = Client.Realize(new AdjPhraseSpec { head = Word.Adjective("important"), PreModifiers = new NLGElement[] { new AdvPhraseSpec { head = Word.Adverb("more"), preMod = new NLGElement[] { Word.Adverb("way") } } } }); Assert.AreEqual("Way more important.", realized); }
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 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 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") } } } } } }));
public static AdvPhraseSpec Adverb(string headWord) => new AdvPhraseSpec { head = Word.Adverb(headWord) };