mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-04 21:50:35 +03:00
* Fix bug in Tokens.ents where entity wasn't being emitted if another started immediately after
This commit is contained in:
parent
0a62c32c14
commit
bf0aff5124
|
@ -158,6 +158,8 @@ cdef class Tokens:
|
||||||
start = -1
|
start = -1
|
||||||
label = 0
|
label = 0
|
||||||
elif token.ent_iob == 3:
|
elif token.ent_iob == 3:
|
||||||
|
if start != -1:
|
||||||
|
yield Span(self, start, i, label=label)
|
||||||
start = i
|
start = i
|
||||||
label = token.ent_type
|
label = token.ent_type
|
||||||
if start != -1:
|
if start != -1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user