From f02c39dfafd94f567d751ce7ced9d6a73e838ec4 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 26 Mar 2015 03:17:24 +0100 Subject: [PATCH] * Compare to is not None, for more robustness --- spacy/tokenizer.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tokenizer.pyx b/spacy/tokenizer.pyx index 1cedac1bc..f20367b08 100644 --- a/spacy/tokenizer.pyx +++ b/spacy/tokenizer.pyx @@ -243,7 +243,7 @@ cdef class Tokenizer: lemma = props.get("L", None) slice_unicode(&string, form, 0, len(form)) tokens[i].lex = self.vocab.get(self.vocab.mem, &string) - if lemma: + if lemma is not None: tokens[i].lemma = self.vocab.strings[lemma] else: tokens[i].lemma = 0