{"record":{"id":"2e1fc0974cc53c5b","repo":"stanfordnlp/CoreNLP","slug":"s-splicing-in-dummytag-for-s","errorCode":null,"errorMessage":"%s: Splicing in DUMMYTAG for %s","messagePattern":"(.+?): Splicing in DUMMYTAG for (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/edu/stanford/nlp/trees/international/arabic/ArabicTreeNormalizer.java","lineNumber":175,"sourceCode":"        }\n\n      } else if (t.isPreTerminal()) {\n\n        if (t.value() == null || t.value().isEmpty()) {\n          log.warn(String.format(\"%s: missing tag for %s\",this.getClass().getName(),t.pennString()));\n        } else if(t.label() instanceof HasTag) {\n          ((HasTag) t.label()).setTag(t.value());\n        }\n\n      } else { //Phrasal nodes\n\n        // there are some nodes \"/\" missing preterminals.  We'll splice in a tag for these.\n        int nk = t.numChildren();\n        List<Tree> newKids = new ArrayList<>(nk);\n        for (int j = 0; j < nk; j++) {\n          Tree child = t.getChild(j);\n          if (child.isLeaf()) {\n            log.warn(String.format(\"%s: Splicing in DUMMYTAG for %s\",this.getClass().getName(),t.toString()));\n            newKids.add(tf.newTreeNode(\"DUMMYTAG\", Collections.singletonList(child)));\n\n          } else {\n            newKids.add(child);\n          }\n        }\n        t.setChildren(newKids);\n      }\n    } //Every node in the tree has now been processed\n\n    //\n    // Additional processing for specific phrasal annotations\n    //\n\n    // special global coding for moving PRD annotation from constituent to verb tag.\n    if (markPRDverb) {\n      TregexMatcher m = prdVerbPattern.matcher(tree);\n      Tree match = null;","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/trees/international/arabic/ArabicTreeNormalizer.java#L157-L193","documentation":"A warning from ArabicTreeNormalizer.normalizeWholeTree handling malformed phrasal nodes whose children include bare leaves directly under a non-preterminal (Arabic treebanks contain nodes like '/' with no preterminal). The normalizer logs '<class>: Splicing in DUMMYTAG for <node>' and inserts a synthetic 'DUMMYTAG' preterminal above the leaf so the tree structure becomes valid. This is automatic repair with a warning, not a failure.","triggerScenarios":"Running normalizeWholeTree on trees where a phrasal node has a Leaf child directly (missing POS layer) — seen in raw ATB trees and trees produced by some segmentation/tokenization tools.","commonSituations":"Arabic Treebank preprocessing for the Arabic parser; trees converted from other corpora formats that omit preterminals under certain punctuation or elided nodes.","solutions":["Accept the repair: DUMMYTAG is spliced automatically and the tree is usable downstream","Pre-scan for leaves under non-preterminals and insert a real POS tag instead, so output has no DUMMYTAG nodes","Filter out or hand-fix the malformed nodes flagged by the warning before parsing/training","If downstream code chokes on DUMMYTAG, post-process the normalized tree replacing DUMMYTAG with an appropriate tag"],"exampleFix":"// before\n// raw ATB tree: (NP /. ) leaf directly under NP -> DUMMYTAG spliced\n// after: pre-insert a real tag\n// (NP (PUNC .)) via tree surgery before normalizeWholeTree\nfor (Tree p : tree) {\n  if (!p.isPreTerminal() && !p.isLeaf()) {\n    for (Tree c : p.children()) {\n      if (c.isLeaf()) p.setChildren(new Tree[]{ tf.newTreeNode(\"PUNC\", Collections.singletonList(c)) });\n    }\n  }\n}","handlingStrategy":"fallback","validationCode":"// detect leaves directly under non-preterminals\nboolean hasBareLeaves = false;\nfor (Tree n : tree) {\n  if (!n.isPreTerminal() && !n.isLeaf()) {\n    for (Tree c : n.children()) if (c.isLeaf()) hasBareLeaves = true;\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  Tree out = normalizer.normalizeWholeTree(tree, tf);\n  if (out.toString().contains(\"DUMMYTAG\")) log.warn(\"DUMMYTAG present; replace with real tag for training\");\n} catch (Exception e) {\n  log.warn(\"Normalization failed\", e);\n}","preventionTips":["Pre-insert real POS tags where ATB trees omit preterminals","Post-scan normalized trees for DUMMYTAG if you train models on them","Use consistent tree-conversion tooling to avoid malformed structures"],"tags":["java","nlp","trees","arabic","tree-repair"],"backgroundTag":"unexpected-response-shape","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"}