diff --git a/spacy/tokens/printers.py b/spacy/tokens/printers.py index c7ae88f3d..16f4b5e08 100644 --- a/spacy/tokens/printers.py +++ b/spacy/tokens/printers.py @@ -37,8 +37,9 @@ def POS_tree(root, light=False, flat=False): `merge_ents(doc)` ran on it. """ subtree = format_POS(root, light=light, flat=flat) - for c in root.children: - subtree["modifiers"].append(POS_tree(c)) + if not flat: + for c in root.children: + subtree["modifiers"].append(POS_tree(c)) return subtree