Fix check for setting ent_id in merge

This commit is contained in:
Matthew Honnibal 2017-03-31 19:32:01 +02:00
parent fc3900e5b2
commit 51882ee2b8

View File

@ -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