Alphabet valueAlph = new Alphabet();
File directory = new File(classDirs.value[i]);
File[] subdirs = getSubDirs(directory);
Alphabet clusterAlph = new Alphabet();
InstanceList instances = new InstanceList(new Noop());
TIntArrayList labels = new TIntArrayList();
for (int j = 0; j < subdirs.length; j++) {
ArrayList<File> records = new FileIterator(subdirs[j]).getFileArray();
int label = clusterAlph.lookupIndex(subdirs[j].toString());
for (int k = 0; k < records.size(); k++) {
if (fi % 100 == 0) System.out.print(fi);
else if (fi % 10 == 0) System.out.print(".");
if (fi % 1000 == 0 && fi > 0) System.out.println();
System.out.flush();
fi++;
File record = records.get(k);
labels.add(label);
instances.add(new Instance(new Record(fieldAlph, valueAlph, parseFile(record)),
new Integer(label), record.toString(),
record.toString()));
}
}
clusterings[i] =
new Clustering(instances, subdirs.length, labels.toNativeArray());
}
logger.info("\nread " + fi + " objects in " + clusterings.length + " clusterings.");
try {
ObjectOutputStream oos =