mirror of https://github.com/explosion/spaCy.git
Break out of infinite loop as intended (#5077)
This commit is contained in:
parent
697bec764d
commit
d078b47c81
|
@ -1175,6 +1175,7 @@ cdef int set_children_from_heads(TokenC* tokens, int length) except -1:
|
||||||
heads_within_sents = _set_lr_kids_and_edges(tokens, length, loop_count)
|
heads_within_sents = _set_lr_kids_and_edges(tokens, length, loop_count)
|
||||||
if loop_count > 10:
|
if loop_count > 10:
|
||||||
user_warning(Warnings.W026)
|
user_warning(Warnings.W026)
|
||||||
|
break
|
||||||
loop_count += 1
|
loop_count += 1
|
||||||
# Set sentence starts
|
# Set sentence starts
|
||||||
for i in range(length):
|
for i in range(length):
|
||||||
|
|
Loading…
Reference in New Issue