mirror of https://github.com/explosion/spaCy.git
* Fix handling of exclusion entities
This commit is contained in:
parent
9f65879991
commit
b0f5c39084
|
@ -168,7 +168,7 @@ cdef class Doc:
|
||||||
cdef attr_t ent_type
|
cdef attr_t ent_type
|
||||||
cdef int start, end
|
cdef int start, end
|
||||||
for ent_type, start, end in ents:
|
for ent_type, start, end in ents:
|
||||||
if ent_type is None:
|
if ent_type is None or ent_type < 0:
|
||||||
# Mark as O
|
# Mark as O
|
||||||
for i in range(start, end):
|
for i in range(start, end):
|
||||||
self.data[i].ent_type = 0
|
self.data[i].ent_type = 0
|
||||||
|
|
Loading…
Reference in New Issue