edu.illinois.cs.cogcomp.core.io.IOUtils.rm()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中edu.illinois.cs.cogcomp.core.io.IOUtils.rm()方法的一些代码示例,展示了IOUtils.rm()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOUtils.rm()方法的具体详情如下:
包路径:edu.illinois.cs.cogcomp.core.io.IOUtils
类名称:IOUtils
方法名:rm

IOUtils.rm介绍

[英]Delete a file
[中]删除文件

代码示例

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-core-utilities

IOUtils.rm(tmpFile);
IOUtils.rm(outputFile);
IOUtils.rm(numTokens + "-total.txt");

代码示例来源:origin: CogComp/cogcomp-nlp

IOUtils.rm(tmpFile);
IOUtils.rm(outputFile);
IOUtils.rm(numTokens + "-total.txt");

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-verbsense

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();
}

代码示例来源:origin: CogComp/cogcomp-nlp

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();
}

代码示例来源:origin: CogComp/cogcomp-nlp

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;
}

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-verbsense

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;
}

相关文章