Package simplenlg.framework

Examples of simplenlg.framework.DocumentElement.addComponent()


    Assert.assertEquals( "Mary chases the monkey. The monkey fights back. Mary is nervous.\n\n", output14a ) ;
    //   actual output ~  Mary chases the monkey. The monkey fights back. Mary is nervous.
    // So what exactly is JUnit not happy about?
    DocumentElement section = nlgFactory.createSection( "The Trials and Tribulation of Mary and the Monkey" ) ;
        section.addComponent( par1 ) ;
        String output14b = realiser.realise( section ).getRealisation() ;
        Assert.assertEquals( "The Trials and Tribulation of Mary and the Monkey\nMary chases the monkey. The monkey fights back. Mary is nervous.\n\n", output14b ) ;
  } // testSection14

} // class
View Full Code Here


    NLGElement realised = null;
    if (element instanceof DocumentElement)
      realised = realise(element);
    else {
      DocumentElement sentence = new DocumentElement(DocumentCategory.SENTENCE, null);
      sentence.addComponent(element);
      realised = realise(sentence);
    }
   
    if (realised == null)
      return null;
View Full Code Here

      t.setTitle(wt.getTitle());
    }

    for (simplenlg.xmlrealiser.wrapper.XmlNLGElement wp : wt.getChild()) {
      NLGElement p = UnwrapNLGElement(wp);
      t.addComponent(p);
    }

    return t;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.