{"record":{"id":"01ea74824e943ed9","repo":"stanfordnlp/CoreNLP","slug":"not-a-valid-ellipses-style-01ea74","errorCode":null,"errorMessage":"Not a valid ellipses style: ","messagePattern":"Not a valid ellipses style: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/international/spanish/process/SpanishLexer.flex","lineNumber":144,"sourceCode":"            normalizeOtherBrackets = val;\n            ellipsisStyle = val ? LexerUtils.EllipsesEnum.ASCII : LexerUtils.EllipsesEnum.ORIGINAL;\n            dashesStyle = val ? LexerUtils.DashesEnum.ASCII : LexerUtils.DashesEnum.ORIGINAL;\n            quoteStyle = val ? LexerUtils.QuotesEnum.ASCII : LexerUtils.QuotesEnum.ORIGINAL;\n          } else if (\"quotes\".equals(key)) {\n            quoteStyle = LexerUtils.QuotesEnum.valueOf(key.trim().toLowerCase(Locale.ROOT));\n          } else if (\"normalizeAmpersandEntity\".equals(key)) {\n            normalizeAmpersandEntity = val;\n          } else if (\"normalizeFractions\".equals(key)) {\n            normalizeFractions = val;\n          } else if (\"normalizeParentheses\".equals(key)) {\n            normalizeParentheses = val;\n          } else if (\"normalizeOtherBrackets\".equals(key)) {\n            normalizeOtherBrackets = 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\":","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/international/spanish/process/SpanishLexer.flex#L126-L162","documentation":"SpanishLexer throws this IllegalArgumentException when the 'ellipses' option value does not match any constant of LexerUtils.EllipsesEnum. The constructor trims and uppercases the value and calls Enum.valueOf; unknown names throw IllegalArgumentException which is rethrown with this message. It is a construction-time configuration validation error.","triggerScenarios":"new SpanishLexer(reader, tf, options) with key=\"ellipses\" and a value like \"ellipsis\", \"three dots\", or \"...\" rather than a valid EllipsesEnum constant (e.g. NONE, UNICODE, PTB).","commonSituations":"Typos in Spanish tokenizer options in CoreNLP pipeline properties; copying option strings from other tokenizers; version differences in enum constants between CoreNLP releases.","solutions":["Use a valid LexerUtils.EllipsesEnum constant name for the ellipses option (e.g. \"none\", \"unicode\", \"ptb\"), case-insensitive.","Check LexerUtils.EllipsesEnum source for the exact accepted values in your CoreNLP version.","Pre-validate the option with a try-catch around Enum.valueOf before constructing the lexer.","The exception message echoes the bad value; use it to find the offending config entry."],"exampleFix":"// before\nprops.put(\"ellipses\", \"threeDots\");\nlex = new SpanishLexer(reader, tf, props);\n// after\nprops.put(\"ellipses\", \"unicode\");\nlex = new SpanishLexer(reader, tf, props);","handlingStrategy":"validation","validationCode":"// before constructing SpanishLexer\nString v = options.get(\"ellipses\");\nif (v != null) {\n  try { LexerUtils.EllipsesEnum.valueOf(v.trim().toUpperCase(Locale.ROOT)); }\n  catch (IllegalArgumentException e) { throw new IllegalArgumentException(\"bad ellipses value: \" + v); }\n}","typeGuard":null,"tryCatchPattern":"try {\n  lex = new SpanishLexer(reader, tf, options);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Not a valid ellipses style\")) {\n    options.put(\"ellipses\", \"unicode\");\n    lex = new SpanishLexer(reader, tf, options);\n  } else throw e;\n}","preventionTips":["Validate enum-valued options against LexerUtils.EllipsesEnum before construction.","Use enum .name() calls rather than raw strings when building option maps.","Add startup tests that construct SpanishLexer with your production properties."],"tags":["java","tokenization","configuration","enum"],"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-15T23:17:13.987Z"}