protected List<LP2Rule> createContextStartRulesForStartRule(final LP2Rule aStartRule) {
    List<LP2Rule> result = new ArrayList<LP2Rule>();
    // 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);
    if (aStartRule.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY)
      ctxStartRule.addPostFillerItem(ctxItem);
    else
      ctxStartRule.addPreFillerItem(ctxItem);
    result.add(ctxStartRule);
    return result;
  }
protected List<LP2Rule> createContextStartRulesForStartRule(final LP2Rule aStartRule) {
    List<LP2Rule> result = new ArrayList<LP2Rule>();
   
   
   
    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);
    if (aStartRule.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY)
      ctxStartRule.addPostFillerItem(ctxItem);
    else
      ctxStartRule.addPreFillerItem(ctxItem);
    result.add(ctxStartRule);
    return result;
  }
protected list<lp2rule> createcontextstartrulesforstartrule(final lp2rule astartrule) { list<lp2rule> result = new arraylist<lp2rule>(); 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); if (astartrule.gettarget().type == mltargettype.single_left_boundary) ctxstartrule.addpostfilleritem(ctxitem); else ctxstartrule.addprefilleritem(ctxitem); result.add(ctxstartrule); return result; }