Package simplenlg.phrasespec

Examples of simplenlg.phrasespec.VPPhraseSpec.addPreModifier()


    AdvPhraseSpec adv1 =this.phraseFactory.createAdverbPhrase("slowly");
    AdvPhraseSpec adv2 =this.phraseFactory.createAdverbPhrase("discretely");

    //case 1: concatenated premods: should have comma
    VPPhraseSpec vp = this.phraseFactory.createVerbPhrase("run");
    vp.addPreModifier(adv1);
    vp.addPreModifier(adv2);
    Assert.assertEquals("slowly, discretely runs", this.realiser.realise(vp).getRealisation());
       
    //case 2: coordinated premods: no comma
    VPPhraseSpec vp2 = this.phraseFactory.createVerbPhrase("eat");
View Full Code Here


    AdvPhraseSpec adv2 =this.phraseFactory.createAdverbPhrase("discretely");

    //case 1: concatenated premods: should have comma
    VPPhraseSpec vp = this.phraseFactory.createVerbPhrase("run");
    vp.addPreModifier(adv1);
    vp.addPreModifier(adv2);
    Assert.assertEquals("slowly, discretely runs", this.realiser.realise(vp).getRealisation());
       
    //case 2: coordinated premods: no comma
    VPPhraseSpec vp2 = this.phraseFactory.createVerbPhrase("eat");
    vp2.addPreModifier(this.phraseFactory.createCoordinatedPhrase(adv1, adv2));
View Full Code Here

    vp.addPreModifier(adv2);
    Assert.assertEquals("slowly, discretely runs", this.realiser.realise(vp).getRealisation());
       
    //case 2: coordinated premods: no comma
    VPPhraseSpec vp2 = this.phraseFactory.createVerbPhrase("eat");
    vp2.addPreModifier(this.phraseFactory.createCoordinatedPhrase(adv1, adv2));
    Assert.assertEquals("slowly and discretely eats", this.realiser.realise(vp2).getRealisation());
  }

  public void testParticipleModifier() {
   
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.