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
1 changed files with 3 additions and 2 deletions

View File

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