Package simplenlg.phrasespec

Examples of simplenlg.phrasespec.SPhraseSpec.addPreModifier()


    Assert.assertEquals(
        "Jake slowly got up and fell down behind the curtain",
        this.realiser.realise(s).getRealisation());

    // add premod to the sentence
    s.addPreModifier(this.lexicon
        .getWord("however", LexicalCategory.ADVERB));
    Assert.assertEquals(
        "Jake however slowly got up and fell down behind the curtain",
        this.realiser.realise(s).getRealisation());
View Full Code Here


    // 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

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.