mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
* Compare to is not None, for more robustness
This commit is contained in:
parent
8f68b864c4
commit
f02c39dfaf
|
@ -243,7 +243,7 @@ cdef class Tokenizer:
|
||||||
lemma = props.get("L", None)
|
lemma = props.get("L", None)
|
||||||
slice_unicode(&string, form, 0, len(form))
|
slice_unicode(&string, form, 0, len(form))
|
||||||
tokens[i].lex = <LexemeC*>self.vocab.get(self.vocab.mem, &string)
|
tokens[i].lex = <LexemeC*>self.vocab.get(self.vocab.mem, &string)
|
||||||
if lemma:
|
if lemma is not None:
|
||||||
tokens[i].lemma = self.vocab.strings[lemma]
|
tokens[i].lemma = self.vocab.strings[lemma]
|
||||||
else:
|
else:
|
||||||
tokens[i].lemma = 0
|
tokens[i].lemma = 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user