Package simplenlg.features

Examples of simplenlg.features.NumberAgreement


      }

      vgComponents.push(frontVG);

    } else {
      NumberAgreement numToUse = determineNumber(phrase.getParent(),
          phrase);
      frontVG.setFeature(Feature.TENSE, phrase.getFeature(Feature.TENSE));
      frontVG.setFeature(Feature.PERSON, phrase
          .getFeature(Feature.PERSON));
      frontVG.setFeature(Feature.NUMBER, numToUse);
View Full Code Here


   * @return the <code>NumberAgreement</code> to be used for the phrase.
   */
  private static NumberAgreement determineNumber(NLGElement parent,
      PhraseElement phrase) {
    Object numberValue = phrase.getFeature(Feature.NUMBER);
    NumberAgreement number = null;
    if (numberValue != null && numberValue instanceof NumberAgreement) {
      number = (NumberAgreement) numberValue;
    } else {
      number = NumberAgreement.SINGULAR;
    }
View Full Code Here

TOP

Related Classes of simplenlg.features.NumberAgreement

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.