// TODO make all other tags contextual tags here. for now we take only
// the counterpart
// tag of the current learning process: (opening/closing tags)
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>();
// 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(
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
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;
}