Package simplenlg.framework

Examples of simplenlg.framework.CoordinatedPhraseElement.addPreModifier()


    //first a simple phrase with no coordinates
    CoordinatedPhraseElement coord = this.phraseFactory.createCoordinatedPhrase();
    Assert.assertEquals("", this.realiser.realise(coord).getRealisation());
   
    //now one with a premodifier and nothing else
    coord.addPreModifier(this.phraseFactory.createAdjectivePhrase("nice"));
    Assert.assertEquals("nice", this.realiser.realise(coord).getRealisation());     
  }
 
  /**
   * Test change from "a" to "an" in the presence of a premodifier with a vowel
View Full Code Here


    coord.setFeature(Feature.TENSE, Tense.PAST);
    Assert.assertEquals("got up and fell down", this.realiser
        .realise(coord).getRealisation());

    // add a premodifier
    coord.addPreModifier("slowly");
    Assert.assertEquals("slowly got up and fell down", this.realiser
        .realise(coord).getRealisation());

    // adda postmodifier
    coord.addPostModifier(this.behindTheCurtain);
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.