use of edu.illinois.cs.cogcomp.verbsense.experiment.PreExtractor in project cogcomp-nlp by CogComp.
the class VerbSenseClassifierMain method preExtract.
private static FeatureVectorCacheFile preExtract(int numConsumers, SenseManager manager, Dataset dataset, String cacheFile) throws Exception {
if (IOUtils.exists(cacheFile)) {
log.warn("Old cache file found. Deleting...");
IOUtils.rm(cacheFile);
log.info("Done");
}
FeatureVectorCacheFile featureCache = new FeatureVectorCacheFile(cacheFile, manager);
Iterator<TextAnnotation> data = SentenceDBHandler.instance.getDataset(dataset);
PreExtractor p = new PreExtractor(manager, data, numConsumers, featureCache);
p.run();
p.finalize();
return featureCache;
}
Aggregations