stanfordnlp/CoreNLP · error · RuntimeException
Missing scorer! Properties were:
Error message
Missing scorer! Properties were:
What it means
When scoring is enabled (HybridCorefProperties.doScore), runCoref calls CorefScorer.getEvalSummary, which launches the external CoNLL reference scorer script at the configured scorer path. If that script is missing (ScorerMissingException), the run rethrows as RuntimeException("Missing scorer! Properties were: ..."), appending the full properties for diagnosis.
Solutions
- Download the official CoNLL-2012 coref scorer scripts and unpack them
- Set the scorer path property to the directory containing the scorer script (e.g. coref.scorer=/path/to/conll-2012-scoring)
- Verify the script is executable (chmod +x) and that its internal paths are intact
- If you don't need evaluation, disable scoring (doScore=false) so the scorer is never invoked
Example fix
// before
props.setProperty("coref.scorer", "/missing/path/scorer");
// after
props.setProperty("coref.scorer", "/opt/conll-2012/v4/scripts/scorer/v4/coref/scorer.pl");
// and verify: new File(scorerPath).exists() Defensive patterns
Strategy: validation
Validate before calling
String scorerPath = CorefProperties.getScorerPath(props);
if (HybridCorefProperties.doScore(props) && !new File(scorerPath).exists()) throw new IllegalStateException("Scorer not found at: " + scorerPath); Try / catch
try { system.runCoref(doc); } catch (RuntimeException e) { if (e.getMessage().startsWith("Missing scorer")) { log.error("Install CoNLL-2012 scorer and set coref.scorer path", e); return; } throw e; } Prevention
- Download the CoNLL-2012 scorer scripts before enabling scoring
- chmod +x the scorer scripts after unpacking
- Verify scorer path in a setup/smoke test
- Disable scoring in runs where metrics are not needed
When it happens
Trigger: Running hybrid coref with scoring on while the scorer path (CorefProperties.getScorerPath, e.g. coref.scorer / reference-corpus path to the v4 scorer script) does not exist on disk or the script's expected directory layout is absent.
Common situations: Forgetting to download/unpack the CoNLL-2012 scorer (corref scorer.pl / v4 scripts) before evaluating; pointing the scorer path at the wrong directory; moving the project without the scorer; running in a container without the script bundled.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Not yet implemented!
- No test treebank path specified...
- Unknown score type
- AttachmentScore cannot be used when count
- Must supply a target label to compute precision and recall…
AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10).
Data as JSON: /api/errors/2698f557686caf31.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/coref/hybrid/HybridCorefSystem.java:193
docCnt = logOutput(wrapper, writerGold, writerBeforeCoref, writerAfterCoref, docCnt);
IOUtils.closeIgnoringExceptions(writerGold);
IOUtils.closeIgnoringExceptions(writerBeforeCoref);
IOUtils.closeIgnoringExceptions(writerAfterCoref);
if(HybridCorefProperties.checkTime(props)) {
System.err.printf("END-TO-END COREF Elapsed time: %.3f seconds\n", (((new Date()).getTime() - startTime.getTime()) / 1000F));
// System.err.printf("CORENLP PROCESS TIME TOTAL: %.3f seconds\n", cs.mentionExtractor.corenlpProcessTime);
}
if(HybridCorefProperties.checkMemory(props)) checkMemoryUsage();
// scoring
if (HybridCorefProperties.doScore(props)) {
String scorerPath = CorefProperties.getScorerPath(props);
String summary;
try {
summary = CorefScorer.getEvalSummary(scorerPath, goldOutput, beforeCorefOutput);
} catch (CorefScorer.ScorerMissingException e) {
throw new RuntimeException("Missing scorer! Properties were:\n" + props);
}
CorefScorer.printScoreSummary(summary, logger, false);
summary = CorefScorer.getEvalSummary(scorerPath, goldOutput, afterCorefOutput);
CorefScorer.printScoreSummary(summary, logger, true);
CorefScorer.printFinalConllScore(summary, logger);
}
}
/**
* Write output of coref system in conll format, and log.
*/
private static int logOutput(MulticoreWrapper<Pair<Document, HybridCorefSystem>, StringBuilder[]> wrapper,
PrintWriter writerGold,
PrintWriter writerBeforeCoref,
PrintWriter writerAfterCoref,
int docCnt) {
while (wrapper.peek()) {View on GitHub (pinned to 1b7edd19c4)