{"record":{"id":"32ad1be359b57241","repo":"stanfordnlp/CoreNLP","slug":"not-a-valid-dashes-style-value-32ad1b","errorCode":null,"errorMessage":"Not a valid dashes style: ${value}","messagePattern":"Not a valid dashes style: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/process/PTBLexer.java","lineNumber":61141,"sourceCode":"              throw new IllegalArgumentException (\"Not a valid quotes style: \" + value);\n            }\n          } else if (\"splitAssimilations\".equals(key)) {\n            splitAssimilations = val;\n          } else if (\"splitHyphenated\".equals(key)) {\n            splitHyphenated = val;\n          } else if (\"splitForwardSlash\".equals(key)) {\n            splitForwardSlash = val;\n          } else if (\"ellipses\".equals(key)) {\n            try {\n              ellipsisStyle = LexerUtils.EllipsesEnum.valueOf(value.trim().toUpperCase(Locale.ROOT));\n            } catch (IllegalArgumentException iae) {\n              throw new IllegalArgumentException (\"Not a valid ellipses style: \" + value);\n            }\n          } else if (\"dashes\".equals(key)) {\n            try {\n              dashesStyle = LexerUtils.DashesEnum.valueOf(value.trim().toUpperCase(Locale.ROOT));\n            } catch (IllegalArgumentException iae) {\n              throw new IllegalArgumentException (\"Not a valid dashes style: \" + value);\n            }\n          } else if (\"escapeForwardSlashAsterisk\".equals(key)) {\n            escapeForwardSlashAsterisk = val;\n          } else if (\"untokenizable\".equals(key)) {\n            switch (value) {\n              case \"noneDelete\":\n                untokenizable = UntokenizableOptions.NONE_DELETE;\n                break;\n              case \"firstDelete\":\n                untokenizable = UntokenizableOptions.FIRST_DELETE;\n                break;\n              case \"allDelete\":\n                untokenizable = UntokenizableOptions.ALL_DELETE;\n                break;\n              case \"noneKeep\":\n                untokenizable = UntokenizableOptions.NONE_KEEP;\n                break;\n              case \"firstKeep\":","sourceCodeStart":61123,"sourceCodeEnd":61159,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/process/PTBLexer.java#L61123-L61159","documentation":"IllegalArgumentException from PTBLexer option parsing when the value given for the 'ellipses' option (or dashes style option) cannot be parsed into the corresponding LexerUtils enum; the options string passed to the tokenizer is invalid.","triggerScenarios":"Option map entry key=\"dashes\" with a value outside DashesEnum, e.g. dashes=em-dash, dashes=hyphen, or dashes=unicode; (note the message text; the option here is dashes).","commonSituations":"Configuring normalization of dashes/quotes/ellipses together and using one consistent-but-wrong style name for all three; older ASCII-only expectations ported to newer CoreNLP where enum names differ.","solutions":["Use an exact LexerUtils.DashesEnum constant name (case-insensitive), e.g. dashes=unicode.","Correct typos and remove decorators like '-dash' from the value.","Align quotes/ellipses/dashes values to the same enum family supported by your CoreNLP version."],"exampleFix":"// before\nprops.setProperty(\"tokenize.options\", \"dashes=em-dash\");\n// after\nprops.setProperty(\"tokenize.options\", \"dashes=unicode\");","handlingStrategy":"validation","validationCode":"boolean ok = Arrays.stream(LexerUtils.DashesEnum.values()).anyMatch(e -> e.name().equalsIgnoreCase(value.trim()));\nif (!ok) throw new IllegalArgumentException(\"dashes must be a LexerUtils.DashesEnum name\");","typeGuard":null,"tryCatchPattern":"try { new PTBTokenizer<>(reader, factory, \"dashes=\" + style); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"dashes style\")) { /* use default */ } else throw e; }","preventionTips":["Derive dashes/quotes/ellipses option strings from the corresponding enums programmatically.","Reject unknown normalization values at config-load time.","Test tokenizer construction once at startup rather than per-request."],"tags":["tokenizer","enum","configuration"],"backgroundTag":"invalid-enum-value","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"}