mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Use correct, non-deprecated merge syntax (resolves #2226)
This commit is contained in:
parent
5957f15227
commit
9632595fb4
|
@ -8,7 +8,7 @@ from ..symbols import HEAD, TAG, DEP, ENT_IOB, ENT_TYPE
|
||||||
def merge_ents(doc):
|
def merge_ents(doc):
|
||||||
"""Helper: merge adjacent entities into single tokens; modifies the doc."""
|
"""Helper: merge adjacent entities into single tokens; modifies the doc."""
|
||||||
for ent in doc.ents:
|
for ent in doc.ents:
|
||||||
ent.merge(ent.root.tag_, ent.text, ent.label_)
|
ent.merge(tag=ent.root.tag_, lemma=ent.text, ent_type=ent.label_)
|
||||||
return doc
|
return doc
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user