From b0f5c39084266248e21e9c0b2475e009628bcbd7 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 6 Aug 2015 17:28:43 +0200 Subject: [PATCH] * Fix handling of exclusion entities --- spacy/tokens/doc.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 74df27f07..7994c97c3 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -168,7 +168,7 @@ cdef class Doc: cdef attr_t ent_type cdef int start, end for ent_type, start, end in ents: - if ent_type is None: + if ent_type is None or ent_type < 0: # Mark as O for i in range(start, end): self.data[i].ent_type = 0