mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
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.
|
||||
"""
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user