{"record":{"id":"28cac84dfd5a381a","repo":"stanfordnlp/CoreNLP","slug":"unknown-style-style","errorCode":null,"errorMessage":"Unknown style: ${style}","messagePattern":"Unknown style: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/classify/LinearClassifier.java","lineNumber":830,"sourceCode":"   * @throws IllegalArgumentException if the style name is unrecognized\n   */\n  public String toString(String style, int param) {\n    if (style == null || style.isEmpty()) {\n      return \"LinearClassifier with \" + featureIndex.size() + \" features, \" +\n              labelIndex.size() + \" classes, and \" +\n              labelIndex.size() * featureIndex.size() + \" parameters.\\n\";\n    } else if (style.equalsIgnoreCase(\"HighWeight\")) {\n      return toBiggestWeightFeaturesString(false, param, true);\n    } else if (style.equalsIgnoreCase(\"HighMagnitude\")) {\n      return toBiggestWeightFeaturesString(true, param, true);\n    } else if (style.equalsIgnoreCase(\"AllWeights\")) {\n      return toAllWeightsString();\n    } else if (style.equalsIgnoreCase(\"WeightHistogram\")) {\n      return toHistogramString();\n    } else if (style.equalsIgnoreCase(\"WeightDistribution\")) {\n      return toDistributionString(param);\n    } else {\n      throw new IllegalArgumentException(\"Unknown style: \" + style);\n    }\n  }\n\n\n  /**\n   * Convert parameter value into number between 0 and 201\n   */\n  private static int bucketizeValue(double wt) {\n    int index;\n    if (wt >= 0.0) {\n      index = ((int) (wt * 10.0)) + 100;\n    } else {\n      index = ((int) (Math.floor(wt * 10.0))) + 100;\n    }\n    if (index < 0) {\n      index = 201;\n    } else if (index > 200) {\n      index = 200;","sourceCodeStart":812,"sourceCodeEnd":848,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/classify/LinearClassifier.java#L812-L848","documentation":"IllegalArgumentException from LinearClassifier.toString(style, param) when the style string matches none of the supported names (HighWeight, HighMagnitude, etc.). It is a formatting-dispatch guard for human-readable classifier dumps.","triggerScenarios":"Thrown at src/edu/stanford/nlp/classify/LinearClassifier.java:830 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported style string such as HighWeight or HighMagnitude","Pass null or empty for the default summary output","Check the style value's spelling and case (comparison is case-insensitive but the name must match)"],"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"}