mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Fix check for setting ent_id in merge
This commit is contained in:
parent
fc3900e5b2
commit
51882ee2b8
|
@ -697,7 +697,7 @@ cdef class Doc:
|
|||
lemma = self.vocab.strings[attributes.get(LEMMA, span.root.lemma)]
|
||||
ent_type = self.vocab.strings[attributes.get(ENT_TYPE, span.root.ent_type)]
|
||||
ent_id = attributes.get('ent_id', span.root.ent_id)
|
||||
if not isinstance(ent_id, int):
|
||||
if isinstance(ent_id, basestring):
|
||||
ent_id = self.vocab.strings[ent_id]
|
||||
|
||||
# Get LexemeC for newly merged token
|
||||
|
|
Loading…
Reference in New Issue
Block a user