mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 20:52:23 +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
|
si = sentence_map[tok.i] # sentence index
|
||||||
for ii in range(1, max_span_width):
|
for ii in range(1, max_span_width):
|
||||||
ei = tok.i + ii # end index
|
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
|
continue
|
||||||
|
|
||||||
begins.append(tok.i)
|
begins.append(tok.i)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user