mirror of https://github.com/explosion/spaCy.git
Fix formatting
This commit is contained in:
parent
39e0586192
commit
705a4e3e4a
|
@ -848,11 +848,11 @@ cdef class Doc:
|
|||
attributes[LEMMA] = lemma
|
||||
attributes[ENT_TYPE] = ent_type
|
||||
elif not args:
|
||||
if "label" in attributes and 'ent_type' not in attributes:
|
||||
if isinstance(attributes["label"], int):
|
||||
attributes[ENT_TYPE] = attributes["label"]
|
||||
if 'label' in attributes and 'ent_type' not in attributes:
|
||||
if isinstance(attributes['label'], int):
|
||||
attributes[ENT_TYPE] = attributes['label']
|
||||
else:
|
||||
attributes[ENT_TYPE] = self.vocab.strings[attributes["label"]]
|
||||
attributes[ENT_TYPE] = self.vocab.strings[attributes['label']]
|
||||
if 'ent_type' in attributes:
|
||||
attributes[ENT_TYPE] = attributes['ent_type']
|
||||
elif args:
|
||||
|
|
Loading…
Reference in New Issue