stanfordnlp/CoreNLP · warning

Skipping excluded file

Error message

Skipping excluded file 

What it means

When running StanfordCoreNLP from the command line over a file list (filelist/ -filelist mode), any file whose name appears in the 'excludeFiles' set (regex 'exclude.files.pattern' or similar) is logged as skipped and not annotated. It is an informational skip, not a failure.

Solutions

  1. If the file should be processed, adjust -exclude.files.pattern so it no longer matches
  2. Remove the excluded file from the -filelist
  3. Move excluded/auxiliary files into a separate directory
  4. Total skipped count is printed at end; check it matches expectations

Example fix

// before
-exclude.files.pattern ".*tmp.*"
// after
-exclude.files.pattern "output_dir/.*"
Defensive patterns

Strategy: validation

Validate before calling

// before running, simulate the exclusion check
Set<String> exclude = buildExcludeFiles(props);
for (File f : files) {
    if (exclude.contains(f.getName())) System.err.println("will be skipped: " + f);
}

Prevention

When it happens

Trigger: Running java -cp ... StanfordCoreNLP -filelist list.txt -exclude.files.pattern "regex" where a file in the list matches the exclusion pattern; StanfordCoreNLP(FileListProcessor-style run) iterates files and calls logger.err with this message.

Common situations: Intentionally excluding output/intermediate files placed in the same directory; accidental matches because the exclusion regex is broader than expected, so input files you wanted get skipped.

Related errors


AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10). Data as JSON: /api/errors/248d875c402f4d1c. Report an issue: GitHub.

Appendix: source

Thrown at src/edu/stanford/nlp/pipeline/StanfordCoreNLP.java:1256

    final String inputSerializerClass = properties.getProperty("inputSerializer", serializerClass);
    final String inputSerializerName = (serializerClass.equals(inputSerializerClass))? "serializer":"inputSerializer";

    final String extension = properties.getProperty("outputExtension", getDefaultExtension(outputFormat));
    final boolean replaceExtension = Boolean.parseBoolean(properties.getProperty("replaceExtension", "false"));
    final boolean continueOnAnnotateError = Boolean.parseBoolean(properties.getProperty("continueOnAnnotateError", "false"));

    final boolean noClobber = Boolean.parseBoolean(properties.getProperty("noClobber", "false"));
    // final boolean randomize = Boolean.parseBoolean(properties.getProperty("randomize", "false"));

    final MutableInteger totalProcessed = new MutableInteger(0);
    final MutableInteger totalSkipped = new MutableInteger(0);
    final MutableInteger totalErrorAnnotating = new MutableInteger(0);

    //for each file...
    for (final File file : files) {
      // Determine if there is anything to be done....
      if (excludeFiles.contains(file.getName())) {
        logger.err("Skipping excluded file " + file.getName());
        totalSkipped.incValue(1);
        continue;
      }

      //--Get Output File Info
      //(filename)
      String outputDir = baseOutputDir;
      if (baseInputDir != null) {
        // Get input file name relative to base
        String relDir = file.getParent().replaceFirst(Pattern.quote(baseInputDir), "");
        outputDir = outputDir + File.separator + relDir;
      }
      // Make sure output directory exists
      new File(outputDir).mkdirs();
      String outputFilename = new File(outputDir, file.getName()).getPath();
      if (replaceExtension) {
        int lastDot = outputFilename.lastIndexOf('.');
        // for paths like "./zzz", lastDot will be 0

View on GitHub (pinned to 1b7edd19c4)