mirror of https://github.com/explosion/spaCy.git
check if argument flat is true or not (#3156)
This commit is contained in:
parent
d97661d18b
commit
214c2ec263
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue