{"record":{"id":"4c8a249df8650a12","repo":"stanfordnlp/CoreNLP","slug":"language-language-does-not-support-parsing","errorCode":null,"errorMessage":"Language <language> does not support parsing!","messagePattern":"Language <language> does not support parsing!","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/parser/nndep/Config.java","lineNumber":263,"sourceCode":"    noPunc = PropertiesUtils.getBool(props, \"noPunc\", noPunc);\n    doWordEmbeddingGradUpdate = PropertiesUtils.getBool(props, \"doWordEmbeddingGradUpdate\", doWordEmbeddingGradUpdate);\n\n    // Runtime parsing options\n    sentenceDelimiter = PropertiesUtils.getString(props, \"sentenceDelimiter\", sentenceDelimiter);\n    tagger = PropertiesUtils.getString(props, \"tagger.model\", tagger);\n\n    String escaperClass = props.getProperty(\"escaper\");\n    escaper = escaperClass != null ? ReflectionLoading.loadByReflection(escaperClass) : null;\n\n    // Language options\n    language = props.containsKey(\"language\")\n               ? getLanguage(props.getProperty(\"language\"))\n               : language;\n    if (language == null) {\n      throw new IllegalArgumentException(\"Unknown language \" + props.containsKey(\"language\"));\n    }\n    if (language.params == null) {\n      throw new IllegalArgumentException(\"Language \" + language + \" does not support parsing!\");\n    }\n    tlp = language.params.treebankLanguagePack();\n    preTokenized = PropertiesUtils.getBool(props, \"tokenized\", preTokenized);\n\n    // if a tlp was specified go with that\n    String tlpCanonicalName = props.getProperty(\"tlp\");\n    if (tlpCanonicalName != null) {\n      try {\n        tlp = ReflectionLoading.loadByReflection(tlpCanonicalName);\n        System.err.println(\"Loaded TreebankLanguagePack: \"+tlpCanonicalName);\n      } catch (Exception e) {\n        System.err.println(\"Error: Failed to load TreebankLanguagePack: \"+tlpCanonicalName);\n      }\n    }\n  }\n\n  /**\n   * Get the {@link edu.stanford.nlp.international.Language}","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/parser/nndep/Config.java#L245-L281","documentation":"After resolving the language, Config.setProperties() checks that the chosen Language has a params object (which supplies the treebank language pack and other parsing settings). If language.params == null, the language is known but does not support the dependency-parsing configuration, so IllegalArgumentException is thrown.","triggerScenarios":"Setting `language` to a value whose Language enum entry has null params (a language entry that only supports other tasks, not parsing).","commonSituations":"Selecting an exotic/newer language in the nndep parser that lacks parsing params; using a language key copied from another CoreNLP tool where it exists but has no nndep params; version mismatch where the language exists but parsing params were only added later.","solutions":["Choose a language that supports parsing (check Config.getLanguage()'s Language enum for non-null params)","Upgrade to a newer CoreNLP version where your language may have parsing params","Use the default ('english') or a supported language like 'english', 'chinese', etc., or supply custom params"],"exampleFix":"// before\nprops.setProperty(\"language\", \"klingon\"); // no parsing params\n// after\nprops.setProperty(\"language\", \"english\"); // supported language","handlingStrategy":"validation","validationCode":"// check the language supports parsing before training\nString lang = props.getProperty(\"language\", \"english\");\nif (!List.of(\"english\",\"chinese\",\"german\",\"spanish\",\"french\").contains(lang)) {\n  throw new IllegalArgumentException(\"Language may not support nndep parsing: \" + lang);\n}","typeGuard":null,"tryCatchPattern":"try {\n  DependencyParser parser = DependencyParser.train(props);\n} catch (IllegalArgumentException e) {\n  props.setProperty(\"language\", \"english\");\n  DependencyParser parser = DependencyParser.train(props);\n}","preventionTips":["Use languages with non-null params in the nndep Language enum","Keep CoreNLP version up to date for newly supported languages","Fall back to a supported default language in configs"],"tags":["java","illegal-argument","nndep","config"],"backgroundTag":"unsupported-config-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"}