stanfordnlp/CoreNLP · warning · IllegalArgumentException

Not a valid ellipses style:

Error message

Not a valid ellipses style: 

What it means

The FrenchLexer's option parser maps the 'ellipses' option string to LexerUtils.EllipsesEnum via valueOf. If the supplied value is not a recognized enum constant (e.g. 'dots', 'ascii' misspelled), it throws IllegalArgumentException('Not a valid ellipses style: ' + value).

Solutions

  1. Use one of the exact LexerUtils.EllipsesEnum constants (case-insensitive, e.g. 'unicode' or 'xml') in the ellipses option
  2. Check LexerUtils.EllipsesEnum source for the exact allowed values
  3. Remove or correct the ellipses option in the tokenizer properties/-tokenizeOptions
  4. Validate option values against the enum before constructing the lexer

Example fix

// before
options = "ellipses=dots"; // IllegalArgumentException
// after
options = "ellipses=unicode"; // valid EllipsesEnum constant
Defensive patterns

Strategy: validation

Validate before calling

try { LexerUtils.EllipsesEnum.valueOf(value.trim().toUpperCase(Locale.ROOT)); }
catch (IllegalArgumentException e) { throw new IllegalArgumentException("Invalid ellipses value: " + value); }

Type guard

boolean isValidEllipses(String v){ for (LexerUtils.EllipsesEnum e : LexerUtils.EllipsesEnum.values()) if (e.name().equalsIgnoreCase(v.trim())) return true; return false; }

Try / catch

try { new FrenchLexer(reader, options); } catch (IllegalArgumentException e) { /* inspect option value in message */ }

Prevention

When it happens

Trigger: Constructing a FrenchLexer (via Lexer options/properties) with options containing ellipses=<bad value> where value.trim().toUpperCase() is not a constant of EllipsesEnum (allowed values are e.g. UNICODE, XML, original).

Common situations: Tokenizer configuration typos in a properties file or -tokenizeOptions string; copying option values from another tokenizer (English/Arabic) whose ellipses vocabulary differs; case or whitespace variations beyond toUpperCase handling.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10). Data as JSON: /api/errors/3c637d3e794990f9. Report an issue: GitHub.

Appendix: source

Thrown at src/edu/stanford/nlp/international/french/process/FrenchLexer.java:12410

          normalizeOtherBrackets = val;
          ellipsisStyle = val ? LexerUtils.EllipsesEnum.ASCII : LexerUtils.EllipsesEnum.ORIGINAL;
          dashesStyle = val ? LexerUtils.DashesEnum.ASCII : LexerUtils.DashesEnum.ORIGINAL;
          quoteStyle = val ? LexerUtils.QuotesEnum.ASCII : LexerUtils.QuotesEnum.ORIGINAL;
        } else if ("quotes".equals(key)) {
          quoteStyle = LexerUtils.QuotesEnum.valueOf(value.toUpperCase(Locale.ROOT));
        } else if ("normalizeAmpersandEntity".equals(key)) {
          normalizeAmpersandEntity = val;
        } else if ("normalizeFractions".equals(key)) {
          normalizeFractions = val;
        } else if ("normalizeParentheses".equals(key)) {
          normalizeParentheses = val;
        } else if ("normalizeOtherBrackets".equals(key)) {
          normalizeOtherBrackets = val;
        } else if ("ellipses".equals(key)) {
          try {
            ellipsisStyle = LexerUtils.EllipsesEnum.valueOf(value.trim().toUpperCase(Locale.ROOT));
          } catch (IllegalArgumentException iae) {
            throw new IllegalArgumentException ("Not a valid ellipses style: " + value);
          }
        } else if ("dashes".equals(key)) {
          try {
            dashesStyle = LexerUtils.DashesEnum.valueOf(value.trim().toUpperCase(Locale.ROOT));
          } catch (IllegalArgumentException iae) {
            throw new IllegalArgumentException ("Not a valid dashes style: " + value);
          }
        } else if ("escapeForwardSlashAsterisk".equals(key)) {
          escapeForwardSlashAsterisk = val;
        } else if ("untokenizable".equals(key)) {
          switch (value) {
            case "noneDelete":
              untokenizable = UntokenizableOptions.NONE_DELETE;
              break;
            case "firstDelete":
              untokenizable = UntokenizableOptions.FIRST_DELETE;
              break;
            case "allDelete":

View on GitHub (pinned to 1b7edd19c4)