diff --git a/spacy/vocab.pxd b/spacy/vocab.pxd index 89e22ed25..dabceb38a 100644 --- a/spacy/vocab.pxd +++ b/spacy/vocab.pxd @@ -20,12 +20,6 @@ cdef struct _Cached: int length -cdef inline void slice_unicode(UniStr* s, Py_UNICODE* chars, int start, int end) nogil: - s.chars = &chars[start] - s.n = end - start - s.key = hash64(s.chars, s.n * sizeof(Py_UNICODE), 0) - - cdef class Vocab: cpdef public get_lex_props cdef Pool mem diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 6c19d277e..80f702572 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -4,6 +4,7 @@ from os import path from .lexeme cimport EMPTY_LEXEME from .lexeme cimport init as lexeme_init +from .strings cimport slice_unicode cdef class Vocab: