static FactorTable getFactorTable(int[][] data, List<Index<CRFLabel>> labelIndices, int numClasses,
CliquePotentialFunction cliquePotentialFunc, double[][] featureValByCliqueSize, int posInSent) {
FactorTable factorTable = null;
for (int j = 0, sz = labelIndices.size(); j < sz; j++) {
Index labelIndex = labelIndices.get(j);
FactorTable ft = new FactorTable(numClasses, j + 1);
double[] featureVal = null;
if (featureValByCliqueSize != null)
featureVal = featureValByCliqueSize[j];
// ... and each possible labeling for that clique
for (int k = 0, liSize = labelIndex.size(); k < liSize; k++) {
int[] label = ((CRFLabel) labelIndex.get(k)).getLabel();
double cliquePotential = cliquePotentialFunc.computeCliquePotential(j+1, k, data[j], featureVal, posInSent);
// for (int m = 0; m < data[j].length; m++) {
// weight += weights[data[j][m]][k];
// }
// try{