{"record":{"id":"0d593baf0c4025d9","repo":"stanfordnlp/CoreNLP","slug":"dependency-parsing-is-not-implemented-for-arabic","errorCode":null,"errorMessage":"Dependency parsing is not implemented for Arabic","messagePattern":"Dependency parsing is not implemented for Arabic","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/simple/ArabicDocument.java","lineNumber":89,"sourceCode":"   * No lemma annotator for Arabic -- set the lemma to be the word.\n   *\n   * @see Document#runLemma(Properties)\n   */\n  @Override\n  protected Document runLemma(Properties props) {\n    return mockLemma(props);\n  }\n\n\n  @Override\n  protected Document runSentiment(Properties props) {\n    throw new IllegalArgumentException(\"Sentiment analysis is not implemented for Arabic\");\n  }\n\n\n  @Override\n  protected Document runDepparse(Properties props) {\n    throw new IllegalArgumentException(\"Dependency parsing is not implemented for Arabic\");\n  }\n\n  @Override\n  protected Document runNER(Properties props) {\n    throw new IllegalArgumentException(\"NER is not implemented for Arabic\");\n  }\n\n\n  @Override\n  public Map<Integer, CorefChain> coref(Properties props) {\n    throw new IllegalArgumentException(\"Coreference is not implemented for Arabic\");\n  }\n\n}\n","sourceCodeStart":71,"sourceCodeEnd":104,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/simple/ArabicDocument.java#L71-L104","documentation":"ArabicDocument.runDepparse() throws IllegalArgumentException because dependency parsing is not implemented for Arabic in the stanford.nlp.simple API. Any call to Document.depparse() on an Arabic document reaches this stub and fails.","triggerScenarios":"Calling depparse() on an ArabicDocument, or running an annotator pipeline that requires dependency parse as a prerequisite (e.g. coref-style operations) on Arabic text.","commonSituations":"Multilingual pipelines applying the same annotation set to all languages; assuming the neural dependency parser supports Arabic.","solutions":["Skip depparse for ArabicDocument instances (instanceof check before calling).","Use a supported language document for dependency parsing.","Train/wire an Arabic dependency model via the full CoreNLP annotator pipeline outside the simple API."],"exampleFix":"// before\ndoc.depparse();\n// after\nif (!(doc instanceof ArabicDocument)) {\n  doc.depparse();\n}","handlingStrategy":"type-guard","validationCode":"if (doc instanceof edu.stanford.nlp.simple.ArabicDocument) skipDepparse = true;","typeGuard":"boolean supportsDepparse(Document doc) { return !(doc instanceof edu.stanford.nlp.simple.ArabicDocument); }","tryCatchPattern":"try {\n  doc.depparse();\n} catch (IllegalArgumentException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"not implemented\")) {\n    log.warn(\"Dependency parsing unavailable for this language, skipping\");\n  } else throw e;\n}","preventionTips":["Check ArabicDocument javadoc for the list of unsupported operations before building pipelines.","Use per-language annotation requirement maps.","Never assume the neural dependency parser supports all languages."],"tags":["nlp","unsupported-language","dependency-parse","arabic"],"backgroundTag":"method-not-implemented","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"}