{"record":{"id":"f725e3b477691ae4","repo":"stanfordnlp/CoreNLP","slug":"warning-no-characters-file","errorCode":null,"errorMessage":"Warning: no characters file!","messagePattern":"Warning: no characters file!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/edu/stanford/nlp/pipeline/QuoteAttributionAnnotator.java","lineNumber":167,"sourceCode":"  private final Map<String, Person.Gender> genderMap;\n  private Map<String, List<Person>> characterMap;\n  private final String qmSieveList;\n  private final String msSieveList;\n  private final DependencyParser parser;\n\n  public QuoteAttributionAnnotator(Properties props) {\n\n    VERBOSE = PropertiesUtils.getBool(props, \"verbose\", false);\n\n    Timing timer = null;\n    COREF_PATH = props.getProperty(\"booknlpCoref\", null);\n    if (COREF_PATH == null && VERBOSE) {\n      log.err(\"Warning: no coreference map!\");\n    }\n    MODEL_PATH = props.getProperty(\"modelPath\", DEFAULT_MODEL_PATH);\n    CHARACTERS_FILE = props.getProperty(\"charactersPath\", null);\n    if(CHARACTERS_FILE == null && VERBOSE) {\n      log.err(\"Warning: no characters file!\");\n    }\n    qmSieveList = props.getProperty(\"QMSieves\", DEFAULT_QMSIEVES);\n    msSieveList = props.getProperty(\"MSSieves\", DEFAULT_MSSIEVES);\n\n    if (VERBOSE) {\n      timer = new Timing();\n      log.info(\"Loading QuoteAttribution coref [\" + COREF_PATH + \"]...\");\n      log.info(\"Loading QuoteAttribution characters [\" + CHARACTERS_FILE + \"]...\");\n    }\n    // loading all our word lists\n    FAMILY_WORD_LIST = props.getProperty(\"familyWordsFile\", FAMILY_WORD_LIST);\n    ANIMACY_WORD_LIST = props.getProperty(\"animacyWordsFile\", ANIMACY_WORD_LIST);\n    GENDER_WORD_LIST = props.getProperty(\"genderNamesFile\", GENDER_WORD_LIST);\n    familyRelations = QuoteAttributionUtils.readFamilyRelations(FAMILY_WORD_LIST);\n    genderMap = QuoteAttributionUtils.readGenderedNounList(GENDER_WORD_LIST);\n    animacyList = QuoteAttributionUtils.readAnimacyList(ANIMACY_WORD_LIST);\n    if (characterMap != null) { // todo [cdm 2020]: Shouldn't this be testing against CHARACTERS_FILE?\n      characterMap = QuoteAttributionUtils.readPersonMap(CHARACTERS_FILE);","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/pipeline/QuoteAttributionAnnotator.java#L149-L185","documentation":"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.","triggerScenarios":"Including 'quoteattribution' in annotators without setting 'charactersPath'; the public constructor QuoteAttributionAnnotator(Properties) detects null CHARACTERS_FILE while VERBOSE is enabled.","commonSituations":"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.","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"],"exampleFix":"// before\nprops.setProperty(\"quote.attribution.sieves\", DEFAULT_QMSIEVES); // no charactersPath\n// after\nprops.setProperty(\"charactersPath\", \"/data/book/characters.tsv\");","handlingStrategy":"validation","validationCode":"String chars = props.getProperty(\"charactersPath\");\nif (chars == null || !new File(chars).canRead()) {\n    throw new IllegalArgumentException(\"'charactersPath' must point to a readable characters file\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify charactersPath file exists and is readable before constructing the annotator","Generate the characters/mentions file as part of your preprocessing pipeline"],"tags":["configuration","missing-file","quote-attribution"],"backgroundTag":"missing-config-value","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}