{"record":{"id":"2610f04456588ffc","repo":"stanfordnlp/CoreNLP","slug":"cannot-create-coref-evaluate-filter","errorCode":null,"errorMessage":"Cannot create coref.evaluate.filter ","messagePattern":"Cannot create coref\\.evaluate\\.filter ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/coref/CorefProperties.java","lineNumber":208,"sourceCode":"    return getLanguage(props).getDisplayName().toLowerCase();\n  }\n\n  public static HeadFinder getHeadFinder(Properties props) {\n    Locale lang = getLanguage(props);\n    if (lang == Locale.ENGLISH) return new SemanticHeadFinder();\n    else if (lang == Locale.CHINESE) return new ChineseSemanticHeadFinder();\n    else {\n      throw new RuntimeException(\"Invalid language setting: cannot load HeadFinder\");\n    }\n  }\n\n  public static Predicate<Pair<CorefChain.CorefMention, List<CoreLabel>>> getCorefMentionFilter(Properties props) {\n    String filterCorefChain = props.getProperty(\"coref.evaluate.filter\");\n    if (filterCorefChain != null) {\n        if (\"filterCustomerAbstractPronouns\".equals(filterCorefChain)) {\n            return CorefUtils.filterCustomerAbstractPronouns;\n        } else {\n            throw new RuntimeException(\"Cannot create coref.evaluate.filter \" + filterCorefChain);\n        }\n    } else {\n        return null;\n    }\n  }\n}\n","sourceCodeStart":190,"sourceCodeEnd":215,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/coref/CorefProperties.java#L190-L215","documentation":"RuntimeException from CorefProperties.getCorefMentionFilter when the class named by coref.evaluate.filter cannot be reflectively instantiated (class missing, wrong constructor, or not a Predicate of Pair<CorefChain.CorefMention, List<CoreLabel>>).","triggerScenarios":"Thrown at src/edu/stanford/nlp/coref/CorefProperties.java:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the coref.evaluate.filter class name and classpath","Ensure it implements Predicate<Pair<CorefChain.CorefMention, List<CoreLabel>>> with a no-arg constructor","Remove the property to use the default filter"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}