stanfordnlp/CoreNLP · error · RuntimeException

Error creating hybrid coref system

Error message

Error creating hybrid coref system

What it means

Wraps exceptions thrown during construction of a hybrid coref system in CorefAlgorithm.fromProps; the underlying component constructors failed (bad properties, missing models, or IO errors) while assembling the hybrid pipeline.

Solutions

  1. Check properties for the hybrid algorithm's component settings
  2. Verify required models and resources are downloaded and paths correct
  3. Inspect the cause for the failing sub-component
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/edu/stanford/nlp/coref/CorefAlgorithm.java:51 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/edu/stanford/nlp/coref/CorefAlgorithm.java:51

    } else if (algorithm == CorefAlgorithmType.FASTNEURAL) {
      return new FastNeuralCorefAlgorithm(props, dictionaries);
    } else if (algorithm == CorefAlgorithmType.CUSTOM) {
      String classname = PropertiesUtils.getString(props, "coref.algorithm.class", null);
      try {
        if (classname != null) {
          Class clazz = Class.forName(classname);
          return (CorefAlgorithm) clazz.getConstructor(Properties.class, Dictionaries.class).newInstance(props, dictionaries);
        } else {
          throw new RuntimeException("Please specify coref.algorithm.class");
        }
      } catch (Exception e) {
        throw new RuntimeException("Error creating custom coref system", e);
      }
    } else {
      try {
        return new HybridCorefSystem(props, dictionaries);
      } catch (Exception e) {
        throw new RuntimeException("Error creating hybrid coref system", e);
      }
    }
  }

}

View on GitHub (pinned to 1b7edd19c4)