Package synalp.commons.input

Examples of synalp.commons.input.Lemma


      String value = attributes.getValue("value");
      if (value == null)
        logger.error("Error: unable to find lemma value attribute for family semantics " + curFamilySemantics);
      else
      {
        curLemma = new Lemma(value.trim());
        curContext = new InstantiationContext();

        Equations equations = new Equations();
        String eq = attributes.getValue("eq");
        if (eq != null)
View Full Code Here


   */
  private static Lemma[] createLemmas(String[] lemmas)
  {
    Lemma[] ret = new Lemma[lemmas.length];
    for(int i = 0; i < lemmas.length; i++)
      ret[i] = new Lemma(lemmas[i]);
    return ret;
  }
View Full Code Here

   */
  public Lemma getFirstFoundLemma(InstantiationContext context)
  {
    for(SelectionTemplate template : templates)
    {
      Lemma lemma = template.getLemma(context);
      if (lemma != null)
        return lemma;
    }

    return null;
View Full Code Here

  public Lemma getLemma(InstantiationContext context)
  {
    if (lemmaValue == null)
    {
      if (context.containsKey(SelectionPattern.LEMMA_VAR))
        return new Lemma(context.get(SelectionPattern.LEMMA_VAR).toString());
      else return null;
    }
    else return new Lemma(context.getValue(lemmaValue).toString());
  }
View Full Code Here

   * @return new entries
   */
  public GrammarEntries createCoselectionEntries(Grammar grammar, Semantics input, GrammarEntries otherEntries)
  {
    GrammarEntries ret = new GrammarEntries();
    Lemma lemma = template.getLemma(context);
    Equations equations = template.getEquations();
    FeatureConstant anchor = new FeatureConstant(context.getValue(SelectionPattern.ANCHOR_VAR).toString());
    for(GrammarEntry entry : grammar.getEntriesContainingTrace(template.getTrace()))
    {
      GrammarEntry newEntry = FamilyLexicalSelection.createEntry(entry, input, context, lemma, equations, false, true);
View Full Code Here

TOP

Related Classes of synalp.commons.input.Lemma

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.