check if argument flat is true or not (#3156)

This commit is contained in:
mauryaland 2019-01-14 23:47:05 +01:00 committed by Matthew Honnibal
parent d97661d18b
commit 214c2ec263

View File

@ -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