{"record":{"id":"ff41dbbf5d78b4f1","repo":"stanfordnlp/CoreNLP","slug":"error-coref-algorithm-hybrid-is-not-supported-for","errorCode":null,"errorMessage":"Error: coref.algorithm=hybrid is not supported for English, please change coref.algorithm or coref.language","messagePattern":"Error: coref\\.algorithm=hybrid is not supported for English, please change coref\\.algorithm or coref\\.language","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/pipeline/CorefAnnotator.java","lineNumber":65,"sourceCode":"  private static final Redwood.RedwoodChannels log = Redwood.channels(CorefAnnotator.class);\n\n  private final CorefSystem corefSystem;\n\n  private boolean performMentionDetection;\n  private CorefMentionAnnotator mentionAnnotator;\n\n  private final Properties props;\n\n  public CorefAnnotator(Properties props) {\n    this.props = props;\n    try {\n      // if user tries to run with coref.language = ENGLISH and coref.algorithm = hybrid, throw Exception\n      // we do not support those settings at this time\n      if (CorefProperties.algorithm(props).equals(CorefProperties.CorefAlgorithmType.HYBRID) &&\n          CorefProperties.getLanguage(props).equals(Locale.ENGLISH)) {\n        log.error(\"Error: coref.algorithm=hybrid is not supported for English, \" +\n            \"please change coref.algorithm or coref.language\");\n        throw new RuntimeException();\n      }\n      // suppress\n      props.setProperty(\"coref.printConLLLoadingMessage\",\"false\");\n      corefSystem = new CorefSystem(props);\n      props.remove(\"coref.printConLLLoadingMessage\");\n    } catch (Exception e) {\n      log.error(\"Error creating CorefAnnotator...terminating pipeline construction!\");\n      log.error(e);\n      throw new RuntimeException(e);\n    }\n    // unless custom mention detection is set, just use the default coref mention detector\n    performMentionDetection = !PropertiesUtils.getBool(props, \"coref.useCustomMentionDetection\", false);\n    if (performMentionDetection)\n      mentionAnnotator = new CorefMentionAnnotator(props);\n  }\n\n  // flip which granularity of ner tag is primary\n  private static void setNamedEntityTagGranularity(Annotation annotation, String granularity) {","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/pipeline/CorefAnnotator.java#L47-L83","documentation":"CorefAnnotator's constructor rejects the combination coref.algorithm=hybrid with coref.language=ENGLISH because the hybrid coreference algorithm is not implemented for English. It logs the message and throws a RuntimeException (no message) during annotator initialization.","triggerScenarios":"Setting properties \"coref.algorithm\"=\"hybrid\" (deterministic + statistical) together with English coref language, e.g. props.setProperty(\"coref.algorithm\", \"hybrid\") in a standard English pipeline containing 'coref'.","commonSituations":"Copying config templates that use hybrid (common for other languages, e.g. Chinese) into an English pipeline; leaving a default algorithm value that resolves to HYBRID while language stays English.","solutions":["Change coref.algorithm to a supported English algorithm, e.g. \"statistical\" or \"neural\".","Alternatively change coref.language to a locale where hybrid is supported.","Remove the coref.algorithm property entirely to use the default for the language."],"exampleFix":"// before\nprops.setProperty(\"coref.algorithm\", \"hybrid\");\n// after\nprops.setProperty(\"coref.algorithm\", \"statistical\");","handlingStrategy":"validation","validationCode":"if (\"hybrid\".equalsIgnoreCase(props.getProperty(\"coref.algorithm\", \"\")) && \"ENGLISH\".equalsIgnoreCase(props.getProperty(\"coref.language\", \"ENGLISH\"))) { props.setProperty(\"coref.algorithm\", \"statistical\"); }","typeGuard":null,"tryCatchPattern":"try { pipeline = new StanfordCoreNLP(props); } catch (RuntimeException e) { if (e.getMessage() == null && props.getProperty(\"coref.algorithm\", \"\").equalsIgnoreCase(\"hybrid\")) { props.setProperty(\"coref.algorithm\", \"statistical\"); pipeline = new StanfordCoreNLP(props); } else { throw e; } }","preventionTips":["Never set coref.algorithm=hybrid for English pipelines.","Keep language/algorithm combinations in a checked config table per CoreNLP version.","Read the release notes: hybrid is only supported for certain languages (e.g. Chinese)."],"tags":["stanford-corenlp","coref","unsupported-combination","config"],"backgroundTag":"unsupported-config-value","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}