{"record":{"id":"a621b0a98b8e0ae2","repo":"stanfordnlp/CoreNLP","slug":"conlluoutputter-unknown-dependencies-type-dep","errorCode":null,"errorMessage":"CoNLLUOutputter: unknown dependencies type \" + dependenciesType","messagePattern":"CoNLLUOutputter: unknown dependencies type \" \\+ dependenciesType","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/pipeline/CoNLLUOutputter.java","lineNumber":129,"sourceCode":"\n  @Override\n  public void print(Annotation doc, OutputStream target, Options options) throws IOException {\n    PrintWriter writer = new PrintWriter(IOUtils.encodedOutputStreamWriter(target, options.encoding));\n\n    List<CoreMap> sentences = doc.get(CoreAnnotations.SentencesAnnotation.class);\n    for (CoreMap sentence : sentences) {\n      SemanticGraph sg = sentence.get(SemanticGraphCoreAnnotations.BasicDependenciesAnnotation.class);\n      if (sg != null) {\n        switch (dependenciesType) {\n        case ENHANCED:\n        case ENHANCEDPLUSPLUS:\n          writer.print(conllUWriter.printSemanticGraph(sg, sentence.get(dependenciesType.annotation())));\n          break;\n        case BASIC:\n          writer.print(conllUWriter.printSemanticGraph(sg));\n          break;\n        default:\n          throw new IllegalArgumentException(\"CoNLLUOutputter: unknown dependencies type \" + dependenciesType);\n        }\n      } else {\n        writer.print(conllUWriter.printPOSAnnotations(sentence, options.printFakeDeps));\n      }\n    }\n    writer.flush();\n  }\n\n\n  public static void conllUPrint(Annotation annotation, OutputStream os) throws IOException {\n    new CoNLLUOutputter().print(annotation, os);\n  }\n\n  public static void conllUPrint(Annotation annotation, OutputStream os, StanfordCoreNLP pipeline) throws IOException {\n    new CoNLLUOutputter().print(annotation, os, pipeline);\n  }\n\n  public static void conllUPrint(Annotation annotation, OutputStream os, Options options) throws IOException {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/pipeline/CoNLLUOutputter.java#L111-L147","documentation":"CoNLLUOutputter.print writes CoNLL-U rows including a dependency column selected by the configured dependenciesType. Only an enum with an annotation plus BASIC (and enhanced variants above) are handled; any other value hits the default branch and throws IllegalArgumentException.","triggerScenarios":"Configuring the conllu outputter (output.dependenciesType / \"dependenciesType\" option) with a value that maps to a DependenciesType enum constant lacking a supported annotation and is not BASIC, e.g. an unrecognized or unsupported name.","commonSituations":"Typo in the dependenciesType option value; using a DependenciesType constant from a different CoreNLP version that this outputter does not support; copy-pasting config from a pipeline using a different output format.","solutions":["Set the dependencies type to a supported value (e.g. basic, enhanced, enhanced-plus-plus).","Check the spelling/case of the configured dependenciesType string.","If you need an unsupported dependency representation, post-process the CoNLL-U output or use a different outputter."],"exampleFix":"// before\nprops.setProperty(\"output.dependenciesType\", \"enhancedDependencys\");\n// after\nprops.setProperty(\"output.dependenciesType\", \"enhanced\");","handlingStrategy":"validation","validationCode":"Set<String> allowed = new HashSet<>(Arrays.asList(\"basic\", \"enhanced\", \"enhanced-plus-plus\"));\nif (!allowed.contains(depsType.toLowerCase())) throw new IllegalArgumentException(\"Unsupported dependenciesType: \" + depsType);","typeGuard":null,"tryCatchPattern":"try { outputter.print(annotation, os); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"unknown dependencies type\")) { log.error(\"Fix output.dependenciesType: \" + e.getMessage()); } else { throw e; } }","preventionTips":["Use the documented dependenciesType values (basic, enhanced, enhanced-plus-plus).","Match option values to your CoreNLP version's supported enum constants.","Centralize output options in a shared config validated at startup."],"tags":["stanford-corenlp","output","conllu","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-17T15:17:12.973Z"}