* Fix bug in Tokens.ents where entity wasn't being emitted if another started immediately after

This commit is contained in:
Matthew Honnibal 2015-04-13 21:34:33 +02:00
parent 0a62c32c14
commit bf0aff5124

View File

@ -158,6 +158,8 @@ cdef class Tokens:
start = -1
label = 0
elif token.ent_iob == 3:
if start != -1:
yield Span(self, start, i, label=label)
start = i
label = token.ent_type
if start != -1: