Search in sources :

Example 1 with PreExtractor

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

Aggregations

TextAnnotation (edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation)1 FeatureVectorCacheFile (edu.illinois.cs.cogcomp.verbsense.caches.FeatureVectorCacheFile)1 PreExtractor (edu.illinois.cs.cogcomp.verbsense.experiment.PreExtractor)1 PruningPreExtractor (edu.illinois.cs.cogcomp.verbsense.experiment.PruningPreExtractor)1