stanfordnlp/CoreNLP · warning

Warning: no coreference map!

Error message

Warning: no coreference map!

What it means

The QuoteAttributionAnnotator (booknlp-style quote attribution) requires a coreference map file given via the 'booknlpCoref' property. When it is absent and verbose=true, it logs this warning; quote attribution will run with no coreference data and produce degraded (or empty) results.

Solutions

  1. Set properties.setProperty("booknlpCoref", "/path/to/coref.tsv") before constructing the annotator
  2. Generate the coreference map first by running the required coref pre-processing for the QuoteAttributionAnnotator
  3. Verify the property key spelling and that the value is not empty/whitespace
  4. Run with verbose=true to confirm which booknlp inputs are missing

Example fix

// before
Properties props = new Properties();
props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,quoteattribution");
// after
Properties props = new Properties();
props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,quoteattribution");
props.setProperty("booknlpCoref", "/data/book/coref.tsv");
Defensive patterns

Strategy: validation

Validate before calling

if (props.getProperty("booknlpCoref") == null) {
    throw new IllegalArgumentException("Set 'booknlpCoref' to the coreference map file before using quoteattribution");
}

Prevention

When it happens

Trigger: Adding the 'quoteattribution' annotator to the pipeline without setting props 'booknlpCoref' to a valid coreference file path, with 'verbose' set to true; constructor QuoteAttributionAnnotator(Properties).

Common situations: Copying a pipeline config from docs but omitting the booknlp.coref file; path typo so getProperty returns null; running on narrative text expecting character attribution without preparing the coref output.

Understand the failure class

Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.

Related errors


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

Appendix: source

Thrown at src/edu/stanford/nlp/pipeline/QuoteAttributionAnnotator.java:162

  public final boolean VERBOSE;

  // fields
  private final Set<String> animacyList;
  private final Set<String> familyRelations;
  private final Map<String, Person.Gender> genderMap;
  private Map<String, List<Person>> characterMap;
  private final String qmSieveList;
  private final String msSieveList;
  private final DependencyParser parser;

  public QuoteAttributionAnnotator(Properties props) {

    VERBOSE = PropertiesUtils.getBool(props, "verbose", false);

    Timing timer = null;
    COREF_PATH = props.getProperty("booknlpCoref", null);
    if (COREF_PATH == null && VERBOSE) {
      log.err("Warning: no coreference map!");
    }
    MODEL_PATH = props.getProperty("modelPath", DEFAULT_MODEL_PATH);
    CHARACTERS_FILE = props.getProperty("charactersPath", null);
    if(CHARACTERS_FILE == null && VERBOSE) {
      log.err("Warning: no characters file!");
    }
    qmSieveList = props.getProperty("QMSieves", DEFAULT_QMSIEVES);
    msSieveList = props.getProperty("MSSieves", DEFAULT_MSSIEVES);

    if (VERBOSE) {
      timer = new Timing();
      log.info("Loading QuoteAttribution coref [" + COREF_PATH + "]...");
      log.info("Loading QuoteAttribution characters [" + CHARACTERS_FILE + "]...");
    }
    // loading all our word lists
    FAMILY_WORD_LIST = props.getProperty("familyWordsFile", FAMILY_WORD_LIST);
    ANIMACY_WORD_LIST = props.getProperty("animacyWordsFile", ANIMACY_WORD_LIST);
    GENDER_WORD_LIST = props.getProperty("genderNamesFile", GENDER_WORD_LIST);

View on GitHub (pinned to 1b7edd19c4)