public virtual void testCoordinationSameSubjectFail()
        {
            IList <NLGElement> elements = new List <NLGElement> {
                s1, s2
            };
            IList <NLGElement> result = coord.apply(elements);

            Assert.AreEqual(2, result.Count);
        }
Ejemplo n.º 2
0
        public void testCoordinationPassiveFail()
        {
            s1.setFeature(Feature.PASSIVE.ToString(), true);
            var elements = new List <INLGElement> {
                s1, s2
            };
            var result = coord.apply(elements);

            Assert.AreEqual(2, result.size());
        }
Ejemplo n.º 3
0
        public virtual void rafaelTest()
        {
            IList <NLGElement>     ss    = new List <NLGElement>();
            ClauseCoordinationRule coord = new ClauseCoordinationRule();

            coord.Factory = phraseFactory;

            ss.Add(agreePhrase("John Lennon"));       // john lennon agreed with it
            ss.Add(disagreePhrase("Geri Halliwell")); // Geri Halliwell disagreed with it
            ss.Add(commentPhrase("Melanie B"));       // Mealnie B commented on it
            ss.Add(agreePhrase("you"));               // you agreed with it
            ss.Add(commentPhrase("Emma Bunton"));     //Emma Bunton commented on it

            IList <NLGElement> results = coord.apply(ss);
            IList <string>     ret     = realizeAll(results);

            Assert.AreEqual(
                "[John Lennon and you agreed with it, Geri Halliwell disagreed with it, Melanie B and Emma Bunton commented on it]",
                ret.ToStringNLG());
        }