stanfordnlp/CoreNLP · warning
Warning: no characters file!
Error message
Warning: no characters file!
What it means
The QuoteAttributionAnnotator needs a characters file (property 'charactersPath') listing book characters for mention matching. If it is not set and verbose=true, this warning is logged; the annotator proceeds without character metadata, degrading mention/character results.
Solutions
- Set properties.setProperty("charactersPath", "/path/to/characters.tsv") before annotating
- Run the character/mention extraction step to generate the characters file
- Check the file exists and is readable at the given path
- Enable verbose=true to see all missing booknlp inputs at once
Example fix
// before
props.setProperty("quote.attribution.sieves", DEFAULT_QMSIEVES); // no charactersPath
// after
props.setProperty("charactersPath", "/data/book/characters.tsv"); Defensive patterns
Strategy: validation
Validate before calling
String chars = props.getProperty("charactersPath");
if (chars == null || !new File(chars).canRead()) {
throw new IllegalArgumentException("'charactersPath' must point to a readable characters file");
} Prevention
- Verify charactersPath file exists and is readable before constructing the annotator
- Generate the characters/mentions file as part of your preprocessing pipeline
When it happens
Trigger: Including 'quoteattribution' in annotators without setting 'charactersPath'; the public constructor QuoteAttributionAnnotator(Properties) detects null CHARACTERS_FILE while VERBOSE is enabled.
Common situations: Forgetting the characters/mentions TSV produced by the booknlp preprocessing step; pointing charactersPath at a nonexistent path in another property and leaving this one unset; sample configs from tutorials only partially copied.
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
- Warning: no coreference map!
- annotator " " requires annotation " ". The usual…
- : Entry doesn't have overwriteable types , but entry type…
- : Ignoring duplicate entry: , old type = , new type =
- : Replacing duplicate entry (higher priority): old= , new=
AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10).
Data as JSON: /api/errors/f725e3b477691ae4.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/pipeline/QuoteAttributionAnnotator.java:167
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);
familyRelations = QuoteAttributionUtils.readFamilyRelations(FAMILY_WORD_LIST);
genderMap = QuoteAttributionUtils.readGenderedNounList(GENDER_WORD_LIST);
animacyList = QuoteAttributionUtils.readAnimacyList(ANIMACY_WORD_LIST);
if (characterMap != null) { // todo [cdm 2020]: Shouldn't this be testing against CHARACTERS_FILE?
characterMap = QuoteAttributionUtils.readPersonMap(CHARACTERS_FILE);View on GitHub (pinned to 1b7edd19c4)