mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Import slice_unicode from strings.pyx
This commit is contained in:
parent
be1bdcbd85
commit
d11c1edf8c
|
@ -20,12 +20,6 @@ cdef struct _Cached:
|
||||||
int length
|
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:
|
cdef class Vocab:
|
||||||
cpdef public get_lex_props
|
cpdef public get_lex_props
|
||||||
cdef Pool mem
|
cdef Pool mem
|
||||||
|
|
|
@ -4,6 +4,7 @@ from os import path
|
||||||
|
|
||||||
from .lexeme cimport EMPTY_LEXEME
|
from .lexeme cimport EMPTY_LEXEME
|
||||||
from .lexeme cimport init as lexeme_init
|
from .lexeme cimport init as lexeme_init
|
||||||
|
from .strings cimport slice_unicode
|
||||||
|
|
||||||
|
|
||||||
cdef class Vocab:
|
cdef class Vocab:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user