{"record":{"id":"d268151739cf4a03","repo":"stanfordnlp/CoreNLP","slug":"unknown-parser-type-parsertype-currently","errorCode":null,"errorMessage":"Unknown parser type: \" + parserType + \" (currently supported: stanford and charniak)","messagePattern":"Unknown parser type: \" \\+ parserType \\+ \" \\(currently supported: stanford and charniak\\)","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/pipeline/AnnotatorImplementations.java","lineNumber":149,"sourceCode":"    String parserType = properties.getProperty(\"parse.type\", \"stanford\");\n    String maxLenStr = properties.getProperty(\"parse.maxlen\");\n\n    if (parserType.equalsIgnoreCase(\"stanford\")) {\n      return new ParserAnnotator(\"parse\", properties);\n    } else if (parserType.equalsIgnoreCase(\"charniak\")) {\n      String model = properties.getProperty(\"parse.model\");\n      String parserExecutable = properties.getProperty(\"parse.executable\");\n      if (model == null || parserExecutable == null) {\n        throw new RuntimeException(\"Both parse.model and parse.executable properties must be specified if parse.type=charniak\");\n      }\n      int maxLen = 399;\n      if (maxLenStr != null) {\n        maxLen = Integer.parseInt(maxLenStr);\n      }\n\n      return new CharniakParserAnnotator(model, parserExecutable, false, maxLen);\n    } else {\n      throw new RuntimeException(\"Unknown parser type: \" + parserType + \" (currently supported: stanford and charniak)\");\n    }\n  }\n\n  public Annotator custom(Properties properties, String property) {\n    String customName = property;\n    String customClassName = properties.getProperty(StanfordCoreNLP.CUSTOM_ANNOTATOR_PREFIX + property);\n    if (property.startsWith(StanfordCoreNLP.CUSTOM_ANNOTATOR_PREFIX)) {\n      customName = property.substring(StanfordCoreNLP.CUSTOM_ANNOTATOR_PREFIX.length());\n      customClassName = properties.getProperty(property);\n    }\n\n    try {\n      // name + properties\n      return new MetaClass(customClassName).createInstance(customName, properties);\n    } catch (MetaClass.ConstructorNotFoundException e) {\n      try {\n        // name\n        return new MetaClass(customClassName).createInstance(customName);","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/pipeline/AnnotatorImplementations.java#L131-L167","documentation":"A configuration error in AnnotatorImplementations.parse: the parse.type property is neither 'stanford' nor 'charniak' (case-insensitive), so no parser implementation can be selected for the ParserAnnotator.","triggerScenarios":"Setting parse.type to an unsupported string, e.g. parse.type=bllip, parse.type=charniak-johnson, or a typo like parse.type=standford.","commonSituations":"Configuring a third-party parser type in a CoreNLP version that only supports stanford/charniak, typos, copying configs from tutorials for other parser integrations.","solutions":["Set parse.type=stanford (default) or parse.type=charniak","Fix typos — matching is equalsIgnoreCase but the string must still match exactly one of the two","If you need another parser (e.g. bllip), use the custom annotator mechanism or a newer CoreNLP release that supports it","Remove the parse.type property entirely to get the default Stanford parser"],"exampleFix":"// before\nprops.setProperty(\"parse.type\", \"standford\");\n// after\nprops.setProperty(\"parse.type\", \"stanford\");","handlingStrategy":"validation","validationCode":"String t = props.getProperty(\"parse.type\", \"stanford\");\nif (!t.equalsIgnoreCase(\"stanford\") && !t.equalsIgnoreCase(\"charniak\"))\n  throw new IllegalArgumentException(\"parse.type must be stanford or charniak: \" + t);","typeGuard":null,"tryCatchPattern":"try {\n  buildPipeline(props);\n} catch (RuntimeException e) {\n  if (e.getMessage().startsWith(\"Unknown parser type\")) {\n    log.error(\"Use parse.type=stanford or charniak\");\n  } else throw e;\n}","preventionTips":["Only use stanford or charniak for parse.type","Fix typos (matching is case-insensitive, not fuzzy)","Omit parse.type for the default parser","Check release notes before porting configs from other parser integrations"],"tags":["configuration","corenlp","parser","invalid-value","java"],"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"}