From d11c1edf8c4776ce515761ace9e06878e692fba6 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 20 Dec 2014 07:56:26 +1100 Subject: [PATCH] * Import slice_unicode from strings.pyx --- spacy/vocab.pxd | 6 ------ spacy/vocab.pyx | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) 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: