From 383dfabd673b5835a0ffd5f3c38617c089fb1c6a Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 6 Aug 2015 16:27:01 +0200 Subject: [PATCH] * Fix matcher setting of entities --- spacy/matcher.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/matcher.pyx b/spacy/matcher.pyx index 5aee7ee8f..7d5d4062a 100644 --- a/spacy/matcher.pyx +++ b/spacy/matcher.pyx @@ -154,5 +154,5 @@ cdef class Matcher: matches.append(get_entity(state, token, token_i)) else: partials.push_back(state + 1) - doc.ents = list(sorted(list(doc.ents) + matches)) + doc.ents = [(e.label, e.start, e.end) for e in doc.ents] + matches return matches