stanfordnlp/CoreNLP · info
%s: Splicing in DUMMYTAG for %s
Error message
%s: Splicing in DUMMYTAG for %s
What it means
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.
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
Example fix
// before
// raw ATB tree: (NP /. ) leaf directly under NP -> DUMMYTAG spliced
// after: pre-insert a real tag
// (NP (PUNC .)) via tree surgery before normalizeWholeTree
for (Tree p : tree) {
if (!p.isPreTerminal() && !p.isLeaf()) {
for (Tree c : p.children()) {
if (c.isLeaf()) p.setChildren(new Tree[]{ tf.newTreeNode("PUNC", Collections.singletonList(c)) });
}
}
} Defensive patterns
Strategy: fallback
Validate before calling
// detect leaves directly under non-preterminals
boolean hasBareLeaves = false;
for (Tree n : tree) {
if (!n.isPreTerminal() && !n.isLeaf()) {
for (Tree c : n.children()) if (c.isLeaf()) hasBareLeaves = true;
}
} Try / catch
try {
Tree out = normalizer.normalizeWholeTree(tree, tf);
if (out.toString().contains("DUMMYTAG")) log.warn("DUMMYTAG present; replace with real tag for training");
} catch (Exception e) {
log.warn("Normalization failed", e);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Arabic Treebank preprocessing for the Arabic parser; trees converted from other corpora formats that omit preterminals under certain punctuation or elided nodes.
Related errors
- %s: missing tag for %s
- %s: Bare tagged word being wrapped in FRAG %s
- this.getClass().getName() + ": Case is presently unsupported
- Arabic does not support feature type: " + feat.toString()
- : Parser grammar does not exist
AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10).
Data as JSON: /api/errors/2e1fc0974cc53c5b.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/trees/international/arabic/ArabicTreeNormalizer.java:175
}
} else if (t.isPreTerminal()) {
if (t.value() == null || t.value().isEmpty()) {
log.warn(String.format("%s: missing tag for %s",this.getClass().getName(),t.pennString()));
} else if(t.label() instanceof HasTag) {
((HasTag) t.label()).setTag(t.value());
}
} else { //Phrasal nodes
// there are some nodes "/" missing preterminals. We'll splice in a tag for these.
int nk = t.numChildren();
List<Tree> newKids = new ArrayList<>(nk);
for (int j = 0; j < nk; j++) {
Tree child = t.getChild(j);
if (child.isLeaf()) {
log.warn(String.format("%s: Splicing in DUMMYTAG for %s",this.getClass().getName(),t.toString()));
newKids.add(tf.newTreeNode("DUMMYTAG", Collections.singletonList(child)));
} else {
newKids.add(child);
}
}
t.setChildren(newKids);
}
} //Every node in the tree has now been processed
//
// Additional processing for specific phrasal annotations
//
// special global coding for moving PRD annotation from constituent to verb tag.
if (markPRDverb) {
TregexMatcher m = prdVerbPattern.matcher(tree);
Tree match = null;View on GitHub (pinned to 1b7edd19c4)