public CRFDatum<List<String>, CRFLabel> makeDatum(List<IN> info, int loc,
      edu.stanford.nlp.sequences.FeatureFactory<IN> featureFactory) {
    pad.set(AnswerAnnotation.class, flags.backgroundSymbol);
    PaddedList<IN> pInfo = new PaddedList<IN>(info, pad);

    ArrayList<List<String>> features = new ArrayList<List<String>>();

    // for (int i = 0; i < windowSize; i++) {
    // List featuresC = new ArrayList();
    // for (int j = 0; j < FeatureFactory.win[i].length; j++) {
    // featuresC.addAll(featureFactory.features(info, loc,
    // FeatureFactory.win[i][j]));
    // }
    // features.add(featuresC);
    // }

    Collection<Clique> done = new HashSet<Clique>();
    for (int i = 0; i < windowSize; i++) {
      List<String> featuresC = new ArrayList<String>();
      List<Clique> windowCliques = FeatureFactory.getCliques(i, 0);
      windowCliques.removeAll(done);
      done.addAll(windowCliques);
      for (Clique c : windowCliques) {
        featuresC.addAll(featureFactory.getCliqueFeatures(pInfo, loc, c)); //todo useless copy because of typing reasons
      }
      features.add(featuresC);
    }

    int[] labels = new int[windowSize];

    for (int i = 0; i < windowSize; i++) {
      String answer = pInfo.get(loc + i - windowSize + 1).get(AnswerAnnotation.class);
      labels[i] = classIndex.indexOf(answer);
    }

    printFeatureLists(pInfo.get(loc), features);

    CRFDatum<List<String>, CRFLabel> d = new CRFDatum<List<String>, CRFLabel>(features, new CRFLabel(labels));
    // System.err.println(d);
    return d;
  }
public CRFDatum < List < String > , CRFLabel > makeDatum ( List < IN > info , int loc , edu . stanford . nlp . sequences . FeatureFactory < IN > featureFactory ) { pad . set ( AnswerAnnotation . class , flags . backgroundSymbol ) ; PaddedList < IN > pInfo = new PaddedList < IN > ( info , pad ) ; ArrayList < List < String > > features = new ArrayList < List < String > > ( ) ; Collection < Clique > done = new HashSet < Clique > ( ) ; for ( int i = 0 ; i < windowSize ; i ++ ) { List < String > featuresC = new ArrayList < String > ( ) ; List < Clique > windowCliques = FeatureFactory . getCliques ( i , 0 ) ; windowCliques . removeAll ( done ) ; done . addAll ( windowCliques ) ; for ( Clique c : windowCliques ) { featuresC . addAll ( featureFactory . getCliqueFeatures ( pInfo , loc , c ) ) ; } features . add ( featuresC ) ; } int [ ] labels = new int [ windowSize ] ; for ( int i = 0 ; i < windowSize ; i ++ ) { String answer = pInfo . get ( loc + i - windowSize + 1 ) . get ( AnswerAnnotation . class ) ; labels [ i ] = classIndex . indexOf ( answer ) ; } printFeatureLists ( pInfo . get ( loc ) , features ) ; CRFDatum < List < String > , CRFLabel > d = new CRFDatum < List < String > , CRFLabel > ( features , new CRFLabel ( labels ) ) ; return d ; }
Makes a CRFDatum by producing features and a label from input data at a
specific position, using the provided factory.

@param info
The input data
@param loc
The position to build a datum at
@param featureFactory
The FeatureFactory to use to extract features
@return The constructed CRFDatum