Examples of addPreModifier()


Examples of simplenlg.phrasespec.SPhraseSpec.addPreModifier()

    // another question from Nicole
    SPhraseSpec run = this.phraseFactory.createClause(
        "you", "go", "running"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    run.setFeature(Feature.MODAL, "should"); //$NON-NLS-1$
    run.addPreModifier("really"); //$NON-NLS-1$
    SPhraseSpec think = this.phraseFactory.createClause("I", "think"); //$NON-NLS-1$ //$NON-NLS-2$
    think.setObject(run);
    run.setFeature(Feature.SUPRESSED_COMPLEMENTISER, true);

    String text = this.realiser.realise(think).getRealisation();
View Full Code Here

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

Examples of simplenlg.phrasespec.VPPhraseSpec.addPreModifier()

    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

Examples of simplenlg.phrasespec.VPPhraseSpec.addPreModifier()

    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.