{"record":{"id":"3706273a6672310e","repo":"stanfordnlp/CoreNLP","slug":"please-specify-at-least-one-of-model-or-model1","errorCode":null,"errorMessage":"Please specify at least one of -model or -model1","messagePattern":"Please specify at least one of -model or -model1","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java","lineNumber":169,"sourceCode":"    } else {\n      int taggerNum = 1;\n      String taggerName = \"model\" + taggerNum;\n      while (props.getProperty(taggerName) != null) {\n        Properties newProps = new Properties();\n        newProps.putAll(props);\n        newProps.setProperty(\"model\", props.getProperty(taggerName));\n        configs.add(newProps);\n        taggers.add(new MaxentTagger(configs.get(taggerNum - 1).getProperty(\"model\"),\n                                     configs.get(taggerNum - 1)));\n\n        ++taggerNum;\n        taggerName = \"model\" + taggerNum;\n      }\n    }\n\n    // no models at all => bad\n    if (taggers.isEmpty()) {\n      throw new IllegalArgumentException(\"Please specify at least one of \" +\n                                         \"-model or -model1\");\n    }\n\n    System.out.println();\n    System.out.println(\"Running the baseline results for tagger 1\");\n    System.out.println();\n\n    // run baseline results for the first tagger model\n    TaggerThread baselineThread =\n      new TaggerThread(taggers.get(0), \"BaseResults-1\");\n    baselineThread.start();\n    baselineThread.join();\n\n    ArrayList<String> baselineResults = new ArrayList<>();\n    baselineResults.add(baselineThread.getResultsString());\n\n    System.out.println();\n    System.out.println(\"Running \" + numThreads + \" threads of tagger 1\");","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java#L151-L187","documentation":"A usage error in TestThreadedTagger.runThreadedTest: no model paths were found among the -model/-model1/-model2... properties, so the threaded test has no taggers to load and aborts with this IllegalArgumentException.","triggerScenarios":"Thrown at src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass -model <path> (or -model1, -model2, ... for comparisons)","Train a tagger first if none exists"],"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"}