mirror of https://github.com/explosion/spaCy.git
Fix head-outside-sentence bug. Fixes #3170
This commit is contained in:
parent
f2fae1f186
commit
9ccd6a3062
|
@ -1000,8 +1000,8 @@ cdef int set_children_from_heads(TokenC* tokens, int length) except -1:
|
||||||
tokens[i].r_kids = 0
|
tokens[i].r_kids = 0
|
||||||
tokens[i].l_edge = i
|
tokens[i].l_edge = i
|
||||||
tokens[i].r_edge = i
|
tokens[i].r_edge = i
|
||||||
# Twice, for non-projectivity
|
# Three times, for non-projectivity
|
||||||
for loop_count in range(2):
|
for loop_count in range(3):
|
||||||
# Set left edges
|
# Set left edges
|
||||||
for i in range(length):
|
for i in range(length):
|
||||||
child = &tokens[i]
|
child = &tokens[i]
|
||||||
|
|
Loading…
Reference in New Issue