Examples of addFrontModifier()


Examples of simplenlg.framework.PhraseElement.addFrontModifier()

    // test agreement in passive
    PhraseElement _s3 = this.phraseFactory.createClause(
        new CoordinatedPhraseElement("my dog", "your cat"), "chase", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        "George"); //$NON-NLS-1$
    _s3.setFeature(Feature.TENSE, Tense.PAST);
    _s3.addFrontModifier("yesterday"); //$NON-NLS-1$
    Assert.assertEquals("yesterday my dog and your cat chased George", //$NON-NLS-1$
        this.realiser.realise(_s3).getRealisation());

    _s3 = this.phraseFactory.createClause(new CoordinatedPhraseElement(
        "my dog", "your cat"), "chase", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
View Full Code Here

Examples of simplenlg.framework.PhraseElement.addFrontModifier()

    _s3 = this.phraseFactory.createClause(new CoordinatedPhraseElement(
        "my dog", "your cat"), "chase", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        this.phraseFactory.createNounPhrase("George")); //$NON-NLS-1$
    _s3.setFeature(Feature.TENSE, Tense.PAST);
    _s3.addFrontModifier("yesterday"); //$NON-NLS-1$
    _s3.setFeature(Feature.PASSIVE, true);
    Assert.assertEquals(
        "yesterday George was chased by my dog and your cat", //$NON-NLS-1$
        this.realiser.realise(_s3).getRealisation());
View Full Code Here

Examples of simplenlg.phrasespec.SPhraseSpec.addFrontModifier()

            "had an adverse contrast media reaction and went into cardiogenic shock",
            this.realiser.realise(coord).getRealisation());

    // now put this in the sentence
    s.setVerbPhrase(coord);
    s.addFrontModifier("As a result of the procedure");
    Assert
        .assertEquals(
            "As a result of the procedure the patient had an adverse contrast media reaction and went into cardiogenic shock",
            this.realiser.realise(s).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.