From 7fc39f124c2bf9b62c63caccd005e9ae7add078b Mon Sep 17 00:00:00 2001 From: adrianeboyd Date: Wed, 23 Oct 2019 14:41:21 +0200 Subject: [PATCH] Fix logic in rules+model entity example [ci skip] (#4510) --- website/docs/usage/rule-based-matching.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/usage/rule-based-matching.md b/website/docs/usage/rule-based-matching.md index fe8e4e2d2..a375f416c 100644 --- a/website/docs/usage/rule-based-matching.md +++ b/website/docs/usage/rule-based-matching.md @@ -1135,6 +1135,8 @@ def expand_person_entities(doc): if prev_token.text in ("Dr", "Dr.", "Mr", "Mr.", "Ms", "Ms."): new_ent = Span(doc, ent.start - 1, ent.end, label=ent.label) new_ents.append(new_ent) + else: + new_ents.append(ent) else: new_ents.append(ent) doc.ents = new_ents