mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-04 21:50:35 +03:00
* Fix get_by_orth for py3
This commit is contained in:
parent
5c9b8d05e4
commit
ceeda5a739
|
@ -107,6 +107,8 @@ cdef class Vocab:
|
||||||
'''Get a pointer to a LexemeC from the lexicon, creating a new Lexeme
|
'''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
|
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.'''
|
is the lexicon's own memory, the lexeme is saved in the lexicon.'''
|
||||||
|
if string == u'':
|
||||||
|
return &EMPTY_LEXEME
|
||||||
cdef LexemeC* lex
|
cdef LexemeC* lex
|
||||||
lex = <LexemeC*>self._by_orth.get(orth)
|
lex = <LexemeC*>self._by_orth.get(orth)
|
||||||
if lex != NULL:
|
if lex != NULL:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user