mirror of https://github.com/explosion/spaCy.git
Fix logic in rules+model entity example [ci skip] (#4510)
This commit is contained in:
parent
835498d24f
commit
7fc39f124c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue