Package simplenlg.phrasespec

Examples of simplenlg.phrasespec.AdvPhraseSpec


 
  /**
   * Test for comma separation between verb premodifiers
   */
  public void testMultipleAdvPremodifiers() { 
    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);
View Full Code Here


      }

      // Adverb Phrase
      else if (wps instanceof simplenlg.xmlrealiser.wrapper.XmlAdvPhraseSpec) {
        simplenlg.xmlrealiser.wrapper.XmlAdvPhraseSpec wp = (simplenlg.xmlrealiser.wrapper.XmlAdvPhraseSpec) wps;
        AdvPhraseSpec p = factory.createAdverbPhrase();
        p.setHead(head);
        hp = p;
        p.setFeature(Feature.IS_COMPARATIVE, wp.isISCOMPARATIVE());
        p.setFeature(Feature.IS_SUPERLATIVE, wp.isISSUPERLATIVE());
      }

      // Verb Phrase
      else if (wps instanceof simplenlg.xmlrealiser.wrapper.XmlVPPhraseSpec) {
        simplenlg.xmlrealiser.wrapper.XmlVPPhraseSpec wp = (simplenlg.xmlrealiser.wrapper.XmlVPPhraseSpec) wps;
View Full Code Here

   * @param adverb
   *            the adverb for this phrase.
   * @return a <code>AdvPhraseSpec</code> representing this phrase.
   */
  public AdvPhraseSpec createAdverbPhrase(String adverb) {
    AdvPhraseSpec phraseElement = new AdvPhraseSpec(this);

    NLGElement adverbElement = createNLGElement(adverb,
        LexicalCategory.ADVERB);
    setPhraseHead(phraseElement, adverbElement);
    return phraseElement;
View Full Code Here

TOP

Related Classes of simplenlg.phrasespec.AdvPhraseSpec

Copyright © 2018 www.massapicom. 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.