FeatureConstraintUtil.readRangeConstraintsFromFile(constraintsFile, trainingList);
logger.info("number of constraints: " + constraintsMap.size());
constraints = new ArrayList<MaxEntGEConstraint>();
MaxEntRangeL2FLGEConstraints geConstraints = new MaxEntRangeL2FLGEConstraints(train.getDataAlphabet().size(),
train.getTargetAlphabet().size(),useValues,normalize);
for (int fi : constraintsMap.keySet()) {
double[][] dist = constraintsMap.get(fi);
for (int li = 0; li < dist.length; li++) {
if (!Double.isInfinite(dist[li][0])) {
geConstraints.addConstraint(fi, li, dist[li][0], dist[li][1], 1);
}
}
}
constraints.add(geConstraints);
}