Package edu.stanford.nlp.sempre

Examples of edu.stanford.nlp.sempre.LanguageInfo.addSpan()


        consequent.addSpan(antecedent, matchedInterval.start,matchedInterval.end);
        consequent.addSpan(antecedent, i,matchedInterval.start);
        consequent.addSpan(antecedent, matchedInterval.end,antecedent.numTokens());
      }
      else if(i>matchedInterval.end) {
        consequent.addSpan(antecedent, 0, matchedInterval.start);
        consequent.addSpan(antecedent, matchedInterval.end,i);
        consequent.addSpan(antecedent, matchedInterval.start,matchedInterval.end);
        consequent.addSpan(antecedent, i,antecedent.numTokens());
      }
      RuleApplication application = new RuleApplication(antecedent, consequent,
View Full Code Here


        consequent.addSpan(antecedent, i,matchedInterval.start);
        consequent.addSpan(antecedent, matchedInterval.end,antecedent.numTokens());
      }
      else if(i>matchedInterval.end) {
        consequent.addSpan(antecedent, 0, matchedInterval.start);
        consequent.addSpan(antecedent, matchedInterval.end,i);
        consequent.addSpan(antecedent, matchedInterval.start,matchedInterval.end);
        consequent.addSpan(antecedent, i,antecedent.numTokens());
      }
      RuleApplication application = new RuleApplication(antecedent, consequent,
          new ApplicationInfo(MOVE,antecedent.lemmaPhrase(matchedInterval.start, matchedInterval.end)));
View Full Code Here

        consequent.addSpan(antecedent, matchedInterval.end,antecedent.numTokens());
      }
      else if(i>matchedInterval.end) {
        consequent.addSpan(antecedent, 0, matchedInterval.start);
        consequent.addSpan(antecedent, matchedInterval.end,i);
        consequent.addSpan(antecedent, matchedInterval.start,matchedInterval.end);
        consequent.addSpan(antecedent, i,antecedent.numTokens());
      }
      RuleApplication application = new RuleApplication(antecedent, consequent,
          new ApplicationInfo(MOVE,antecedent.lemmaPhrase(matchedInterval.start, matchedInterval.end)));
      application.addFeatures(featurizeMovedSpan(antecedent,matchedInterval));
View Full Code Here

      }
      else if(i>matchedInterval.end) {
        consequent.addSpan(antecedent, 0, matchedInterval.start);
        consequent.addSpan(antecedent, matchedInterval.end,i);
        consequent.addSpan(antecedent, matchedInterval.start,matchedInterval.end);
        consequent.addSpan(antecedent, i,antecedent.numTokens());
      }
      RuleApplication application = new RuleApplication(antecedent, consequent,
          new ApplicationInfo(MOVE,antecedent.lemmaPhrase(matchedInterval.start, matchedInterval.end)));
      application.addFeatures(featurizeMovedSpan(antecedent,matchedInterval));
      res.add(application);
View Full Code Here

  private LanguageInfo generateConsequent(LanguageInfo antecedent,
      int matchStart, int matchEnd, LanguageInfo target, int targetStart,
      int targetEnd) {
    LanguageInfo res = new LanguageInfo();
    res.addSpan(antecedent, 0, matchStart);
    res.addSpan(target, targetStart, targetEnd);
    res.addSpan(antecedent, matchEnd, antecedent.numTokens());
    return res;
  }
 
View Full Code Here

  private LanguageInfo generateConsequent(LanguageInfo antecedent,
      int matchStart, int matchEnd, LanguageInfo target, int targetStart,
      int targetEnd) {
    LanguageInfo res = new LanguageInfo();
    res.addSpan(antecedent, 0, matchStart);
    res.addSpan(target, targetStart, targetEnd);
    res.addSpan(antecedent, matchEnd, antecedent.numTokens());
    return res;
  }
 
}
View Full Code Here

      int matchStart, int matchEnd, LanguageInfo target, int targetStart,
      int targetEnd) {
    LanguageInfo res = new LanguageInfo();
    res.addSpan(antecedent, 0, matchStart);
    res.addSpan(target, targetStart, targetEnd);
    res.addSpan(antecedent, matchEnd, antecedent.numTokens());
    return res;
  }
 
}
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.