// ================================ BUILD ================================
public void build(int labelCutoff, int featureCutoff)
{
SparseFeatureVector vector;
StringInstance instance;
int label;
l_instances = Lists.newArrayList();
buildLabels (labelCutoff);
buildFeatures(featureCutoff);
while ((instance = i_collector.pollInstance()) != null)
{
if ((label = getLabelIndex(instance.getLabel())) < 0)
continue;
vector = toSparseFeatureVector(instance.getFeatureVector());
if (!vector.isEmpty()) l_instances.add(new IntInstance(label, vector));
}
}