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