check if argument flat is true or not
@@ -37,6 +37,7 @@ def POS_tree(root, light=False, flat=False):
`merge_ents(doc)` ran on it.
"""
subtree = format_POS(root, light=light, flat=flat)
+ if not flat:
for c in root.children:
subtree["modifiers"].append(POS_tree(c))
return subtree
