From 705a4e3e4ab24aa39a4ff5a1c0de39cdb5053937 Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 1 Nov 2017 16:44:08 +0100 Subject: [PATCH] Fix formatting --- spacy/tokens/doc.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index fb15323f5..dd01343d2 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -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: