use of edu.illinois.cs.cogcomp.verbsense.experiment.PruningPreExtractor in project cogcomp-nlp by CogComp.
the class VerbSenseClassifierMain method pruneFeatures.
private static void pruneFeatures(int numConsumers, SenseManager manager, FeatureVectorCacheFile featureCache, String cacheFile2) throws Exception {
if (IOUtils.exists(cacheFile2)) {
log.warn("Old pruned cache file found. Deleting...");
IOUtils.rm(cacheFile2);
log.info("Done");
}
log.info("Pruning features. Saving pruned features to {}", cacheFile2);
FeatureVectorCacheFile prunedfeatureCache = new FeatureVectorCacheFile(cacheFile2, manager);
PruningPreExtractor p1 = new PruningPreExtractor(manager, featureCache, prunedfeatureCache, numConsumers);
p1.run();
p1.finalize();
}
Aggregations