Search in sources :

Example 1 with PruningPreExtractor

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();
}
Also used : PruningPreExtractor(edu.illinois.cs.cogcomp.verbsense.experiment.PruningPreExtractor) FeatureVectorCacheFile(edu.illinois.cs.cogcomp.verbsense.caches.FeatureVectorCacheFile)

Aggregations

FeatureVectorCacheFile (edu.illinois.cs.cogcomp.verbsense.caches.FeatureVectorCacheFile)1 PruningPreExtractor (edu.illinois.cs.cogcomp.verbsense.experiment.PruningPreExtractor)1