From 0f093fdb307f9add47593d1dfe623ade7b044145 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 26 Jul 2015 19:26:41 +0200 Subject: [PATCH] * Fix get_by_orth for py3 --- spacy/vocab.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 6e98fb7d5..75a7844e1 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -107,7 +107,7 @@ cdef class Vocab: '''Get a pointer to a LexemeC from the lexicon, creating a new Lexeme if necessary, using memory acquired from the given pool. If the pool is the lexicon's own memory, the lexeme is saved in the lexicon.''' - if string == u'': + if orth == 0: return &EMPTY_LEXEME cdef LexemeC* lex lex = self._by_orth.get(orth)