/**
  * Instantiates a new clause aggregation test.
  *
  * @param name
  *            the name
  */
 public ClauseAggregationTest(string name) : base(name)
 {
     aggregator = new Aggregator();
     aggregator.initialise();
     coord = new ClauseCoordinationRule();
     fcr   = new ForwardConjunctionReductionRule();
     bcr   = new BackwardConjunctionReductionRule();
 }
        public override void tearDown()
        {
            base.tearDown();

            s1         = null;
            s2         = null;
            s3         = null;
            s4         = null;
            s5         = null;
            s6         = null;
            aggregator = null;
            coord      = null;
            fcr        = null;
            bcr        = null;
        }
示例#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());
        }