Examples of MLLP2ContextConstraint


Examples of org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint

      if (true) {
        rule = rule.copy();
        LP2RuleItem item = rule.getMarkingRuleItem();
        // TextRulerToolkit.log("CONTEXTUAL RULE CANDIDATE: "+rule.getRuleString()+"  ;  "+rule.getCoveringStatistics());
        item.setContextConstraint(new MLLP2ContextConstraint(slotMaximumTokenCountMap.get(rule
                .getTarget().getSingleSlotRawTypeName()), rule));
        rule.setIsContextualRule(true);

        rule.setNeedsCompile(true);
View Full Code Here

Examples of org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint

      currentBestRules.cutToMaxSize();
    } else if (!tooFewPositives && (ctxStartRules.size() > 0)) {
      // new: use precalculated ctx startrules:
      for (LP2Rule ctxStartRule : ctxStartRules) {

        MLLP2ContextConstraint ctxConstraint = ctxStartRule.getMarkingRuleItem()
                .getContextConstraint();
        LP2Rule newCTXRule = newRule.copy();
        newCTXRule.setIsContextualRule(true);
        newCTXRule.getMarkingRuleItem().setContextConstraint(ctxConstraint.copy());
        newCTXRule.setNeedsCompile(true);
        newCTXRule.compileRuleString();
        newCTXRule.setCoveringStatistics(getCoveringIntersection(newRule.getCoveringStatistics(),
                ctxStartRule.getCoveringStatistics()));
        // if
View Full Code Here

Examples of org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint

    // TODO make all other tags contextual tags here. for now we take only
    // the counterpart
    // tag of the current learning process: (opening/closing tags)

    LP2RuleItem ctxItem = new LP2RuleItem();
    MLLP2ContextConstraint ctxConstraint = new MLLP2ContextConstraint(
            slotMaximumTokenCountMap.get(aStartRule.getTarget().getSingleSlotRawTypeName()),
            aStartRule);
    ctxItem.setContextConstraint(ctxConstraint);
    LP2Rule ctxStartRule = new LP2Rule(this, aStartRule.getTarget());
    ctxStartRule.setIsContextualRule(true);
View Full Code Here

Examples of org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint

      if (true) {
        rule = rule.copy();
        LP2RuleItem item = rule.getMarkingRuleItem();
        // TextRulerToolkit.log("CONTEXTUAL RULE CANDIDATE: "+rule.getRuleString()+"  ;  "+rule.getCoveringStatistics());
        item.setContextConstraint(new MLLP2ContextConstraint(slotMaximumTokenCountMap.get(rule
                .getTarget().getSingleSlotRawTypeName()), rule));
        rule.setIsContextualRule(true);

        rule.setNeedsCompile(true);
View Full Code Here

Examples of org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint

      currentBestRules.cutToMaxSize();
    } else if (!tooFewPositives && (ctxStartRules.size() > 0)) {
      // new: use precalculated ctx startrules:
      for (LP2Rule ctxStartRule : ctxStartRules) {

        MLLP2ContextConstraint ctxConstraint = ctxStartRule.getMarkingRuleItem()
                .getContextConstraint();
        LP2Rule newCTXRule = newRule.copy();
        newCTXRule.setIsContextualRule(true);
        newCTXRule.getMarkingRuleItem().setContextConstraint(ctxConstraint.copy());
        newCTXRule.setNeedsCompile(true);
        newCTXRule.compileRuleString();
        newCTXRule.setCoveringStatistics(getCoveringIntersection(newRule.getCoveringStatistics(),
                ctxStartRule.getCoveringStatistics()));
        // if
View Full Code Here

Examples of org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint

    // TODO make all other tags contextual tags here. for now we take only
    // the counterpart
    // tag of the current learning process: (opening/closing tags)

    LP2RuleItem ctxItem = new LP2RuleItem();
    MLLP2ContextConstraint ctxConstraint = new MLLP2ContextConstraint(
            slotMaximumTokenCountMap.get(aStartRule.getTarget().getSingleSlotRawTypeName()),
            aStartRule);
    ctxItem.setContextConstraint(ctxConstraint);
    LP2Rule ctxStartRule = new LP2Rule(this, aStartRule.getTarget());
    ctxStartRule.setIsContextualRule(true);
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.