{"record":{"id":"65cbed940e74dea6","repo":"stanfordnlp/CoreNLP","slug":"could-not-load-clause-splitter-model-at-splitt","errorCode":null,"errorMessage":"Could not load clause splitter model at \" + splitterModel","messagePattern":"Could not load clause splitter model at \" \\+ splitterModel","errorType":"exception","errorClass":"RuntimeIOException","httpStatus":null,"severity":"critical","filePath":"src/edu/stanford/nlp/naturalli/OpenIE.java","lineNumber":192,"sourceCode":"      withoutOpenIEPrefix.setProperty(key.replace(\"openie.\", \"\"), props.getProperty(key));\n    }\n    ArgumentParser.fillOptions(this, withoutOpenIEPrefix);\n\n    // Create the clause splitter\n    try {\n      if (splitterDisable) {\n        clauseSplitter = Optional.empty();\n      } else {\n        if (noModel) {\n          log.info(\"Not loading a splitter model\");\n          clauseSplitter = Optional.of(ClauseSplitterSearchProblem::new);\n        } else {\n          clauseSplitter = Optional.of(ClauseSplitter.load(splitterModel));\n        }\n      }\n    } catch (IOException e) {\n      //throw new RuntimeIOException(\"Could not load clause splitter model at \" + splitterModel + \": \" + e.getClass() + \": \" + e.getMessage());\n      throw new RuntimeIOException(\"Could not load clause splitter model at \" + splitterModel, e);\n    }\n\n    // Create the forward entailer\n    try {\n      this.weights = ignoreAffinity ? new NaturalLogicWeights(affinityProbabilityCap) : new NaturalLogicWeights(affinityModels, affinityProbabilityCap);\n    } catch (IOException e) {\n      throw new RuntimeIOException(\"Could not load affinity model at \" + affinityModels + \": \" + e.getMessage());\n    }\n    forwardEntailer = new ForwardEntailer(entailmentsPerSentence, weights);\n\n    // Create the relation segmenter\n    segmenter = new RelationTripleSegmenter(allNominals);\n  }\n\n  /**\n   * Find the clauses in a sentence, where the sentence is expressed as a dependency tree.\n   *\n   * @param tree The dependency tree representation of the sentence.","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/naturalli/OpenIE.java#L174-L210","documentation":"The OpenIE constructor attempts to load the clause splitter model via ClauseSplitter.load(splitterModel). If the model file cannot be read (missing path, wrong format, IO error), the IOException is wrapped in a RuntimeIOException naming the model path. Model loading happens during annotator construction, so this fails immediately when the pipeline is built.","triggerScenarios":"Constructing OpenIE (directly or via StanfordCoreNLP with the openie annotator) with a -openie.clause_splitter_model path that does not exist, is unreadable, or is not a valid gzip-serialized ClauseSplitter model.","commonSituations":"Typos in model file paths; downloading a model for the wrong CoreNLP version; running without the models jar on the classpath; permissions issues on the model file.","solutions":["Verify the splitter model file exists and is readable at the configured path (or omit the custom path to use the default from the classpath).","Ensure the CoreNLP models jar matching your library version is on the classpath.","Check that the file is a valid serialized model and matches your CoreNLP version; re-download if corrupt.","Catch RuntimeIOException at construction time and report a clear configuration error to the user."],"exampleFix":"// before\nprops.setProperty(\"openie.clause_splitter_model\", \"/models/splitter.gz\"); // file missing\n// after\nFile f = new File(\"/models/splitter.gz\");\nif (!f.isFile() || !f.canRead()) throw new IllegalArgumentException(\"Splitter model not found: \" + f);\nprops.setProperty(\"openie.clause_splitter_model\", f.getAbsolutePath());","handlingStrategy":"try-catch","validationCode":"java.io.File f = new java.io.File(splitterModelPath);\nif (!f.isFile() || !f.canRead()) throw new IllegalArgumentException(\"Clause splitter model missing/unreadable: \" + f);","typeGuard":null,"tryCatchPattern":"try {\n  openie = new OpenIE(props);\n} catch (RuntimeIOException e) {\n  throw new IllegalStateException(\"Bad OpenIE model configuration: \" + e.getMessage(), e);\n}","preventionTips":["Check model file existence/permissions before building the pipeline","Keep the CoreNLP models jar version-matched with the library","Catch RuntimeIOException at pipeline construction, not annotation time"],"tags":["model-loading","io","naturalli","openie","resource"],"backgroundTag":"file-not-found","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"}