{"record":{"id":"e6d8cfa15c96919d","repo":"stanfordnlp/CoreNLP","slug":"model-parameter-must-be-specified","errorCode":null,"errorMessage":"'model' parameter must be specified","messagePattern":"'model' parameter must be specified","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java","lineNumber":201,"sourceCode":"      this.setProperty(\"file\", props.getProperty(\"testFile\", \"\").trim());\n    } else if (props.containsKey(\"textFile\")) {\n      //Tagging mode\n      this.setProperty(\"mode\", Mode.TAG.toString());\n      this.setProperty(\"file\", props.getProperty(\"textFile\", \"\").trim());\n    } else if (props.containsKey(\"dump\")) {\n      this.setProperty(\"mode\", Mode.DUMP.toString());\n      // this.setProperty(\"file\", props.getProperty(\"dump\").trim());\n      props.setProperty(\"model\", props.getProperty(\"dump\").trim());\n    } else {\n      this.setProperty(\"mode\", Mode.TAG.toString());\n      this.setProperty(\"file\", \"stdin\");\n    }\n    //for any mode other than train, we load a classifier, which means we load a config - model always needs to be specified\n    //on command line/in props file\n    //Get the path to the model (or the path where you'd like to save the model); this is necessary for training, testing, and tagging\n    this.setProperty(\"model\", props.getProperty(\"model\", this.getProperty(\"model\", \"\")).trim());\n    if ( ! (this.getMode() == Mode.DUMP) && this.getProperty(\"model\").isEmpty()) {\n      throw new RuntimeException(\"'model' parameter must be specified\");\n    }\n\n    this.setProperty(\"search\", props.getProperty(\"search\", this.getProperty(\"search\")).trim().toLowerCase());\n    String srch = this.getProperty(\"search\");\n    if ( ! (srch.equals(\"cg\") || srch.equals(\"iis\") || srch.equals(\"owlqn\") || srch.equals(\"qn\") || srch.equals(\"owlqn2\"))) {\n      throw new RuntimeException(\"'search' must be one of 'iis', 'cg', 'qn' or 'owlqn' or 'owlqn2': \" + srch);\n    }\n\n    this.setProperty(\"sigmaSquared\", props.getProperty(\"sigmaSquared\", this.getProperty(\"sigmaSquared\")));\n\n    this.setProperty(TAG_SEPARATOR_PROPERTY, props.getProperty(TAG_SEPARATOR_PROPERTY, this.getProperty(TAG_SEPARATOR_PROPERTY)));\n\n    this.setProperty(\"iterations\", props.getProperty(\"iterations\", this.getProperty(\"iterations\")));\n    this.setProperty(\"rareWordThresh\", props.getProperty(\"rareWordThresh\", this.getProperty(\"rareWordThresh\")));\n    this.setProperty(\"minFeatureThresh\", props.getProperty(\"minFeatureThresh\", this.getProperty(\"minFeatureThresh\")));\n    this.setProperty(\"curWordMinFeatureThresh\", props.getProperty(\"curWordMinFeatureThresh\", this.getProperty(\"curWordMinFeatureThresh\")));\n    this.setProperty(\"rareWordMinFeatureThresh\", props.getProperty(\"rareWordMinFeatureThresh\", this.getProperty(\"rareWordMinFeatureThresh\")));\n    this.setProperty(\"veryCommonWordThresh\", props.getProperty(\"veryCommonWordThresh\", this.getProperty(\"veryCommonWordThresh\")));","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java#L183-L219","documentation":"A required-configuration error in TaggerConfig.setProperties: after resolving the mode (train/test/tag/dump), no 'model' path was provided in the properties, yet every mode needs the model file location to load or save the tagger.","triggerScenarios":"Thrown at src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java:201 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass -model <path> pointing to a trained tagger","For dump mode pass -dump <path> (it maps to model)","Supply trainFile instead if you meant to train"],"exampleFix":null,"handlingStrategy":"validation","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"}