mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 04:32:32 +03:00
Small fix
This commit is contained in:
parent
fce804a79f
commit
848fd102e7
|
@ -143,8 +143,7 @@ def get_candidate_mentions(
|
|||
si = sentence_map[tok.i] # sentence index
|
||||
for ii in range(1, max_span_width):
|
||||
ei = tok.i + ii # end index
|
||||
|
||||
if ei > len(doc) or sentence_map[ei] != si:
|
||||
if ei >= len(doc) or sentence_map[ei] != si:
|
||||
continue
|
||||
|
||||
begins.append(tok.i)
|
||||
|
|
Loading…
Reference in New Issue
Block a user