Small fix

This commit is contained in:
Paul O'Leary McCann 2021-06-17 21:19:38 +09:00
parent fce804a79f
commit 848fd102e7

View File

@ -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)