2014-08-03 00:51:52 +04:00
|
|
|
from libc.stdint cimport uint32_t
|
2014-07-07 06:21:06 +04:00
|
|
|
from libc.stdint cimport uint64_t
|
2014-08-25 18:42:22 +04:00
|
|
|
from spacy.word cimport Lexeme
|
2014-09-10 20:11:13 +04:00
|
|
|
from spacy.tokens cimport Tokens
|
|
|
|
|
|
|
|
|
|
|
|
cdef struct Flags:
|
|
|
|
size_t is_alpha
|
|
|
|
size_t can_noun
|
|
|
|
|
|
|
|
|
|
|
|
cdef struct ViewIDs:
|
|
|
|
size_t canon_form
|
2014-07-07 18:58:48 +04:00
|
|
|
|
2014-07-07 14:47:21 +04:00
|
|
|
|
2014-08-27 19:15:39 +04:00
|
|
|
cdef class Lexicon:
|
2014-09-10 20:11:13 +04:00
|
|
|
cpdef readonly size_t size
|
|
|
|
|
2014-08-27 19:15:39 +04:00
|
|
|
cpdef Lexeme lookup(self, unicode string)
|
2014-09-11 23:54:34 +04:00
|
|
|
cdef size_t get(self, unicode string)
|
2014-08-29 03:59:23 +04:00
|
|
|
|
|
|
|
cdef dict _dict
|
|
|
|
|
|
|
|
cdef list _string_features
|
|
|
|
cdef list _flag_features
|
2014-08-27 19:15:39 +04:00
|
|
|
|
|
|
|
|
2014-07-07 14:47:21 +04:00
|
|
|
cdef class Language:
|
2014-08-29 03:59:23 +04:00
|
|
|
cdef unicode name
|
2014-08-27 19:15:39 +04:00
|
|
|
cdef dict cache
|
|
|
|
cpdef readonly Lexicon lexicon
|
2014-09-10 20:11:13 +04:00
|
|
|
cpdef readonly object tokens_class
|
2014-07-07 06:21:06 +04:00
|
|
|
|
2014-09-11 23:37:32 +04:00
|
|
|
cpdef Tokens tokenize(self, unicode text)
|
2014-08-29 03:59:23 +04:00
|
|
|
cpdef Lexeme lookup(self, unicode text)
|
2014-08-16 05:22:03 +04:00
|
|
|
|
2014-09-10 20:11:13 +04:00
|
|
|
cdef _tokenize(self, Tokens tokens, unicode string)
|
2014-08-29 03:59:23 +04:00
|
|
|
cdef list _split(self, unicode string)
|
|
|
|
cdef int _split_one(self, unicode word)
|