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-22 19:28:23 +04:00
|
|
|
from spacy.word cimport Word
|
2014-07-07 06:21:06 +04:00
|
|
|
|
2014-08-03 00:51:52 +04:00
|
|
|
ctypedef uint32_t StringHash
|
2014-07-07 18:58:48 +04:00
|
|
|
|
|
|
|
|
2014-07-07 14:47:21 +04:00
|
|
|
|
|
|
|
cdef class Language:
|
|
|
|
cdef object name
|
2014-08-22 19:13:09 +04:00
|
|
|
cdef dict chunks
|
|
|
|
cdef dict vocab
|
2014-07-07 14:47:21 +04:00
|
|
|
cdef dict bacov
|
2014-07-07 06:21:06 +04:00
|
|
|
|
2014-08-22 19:28:23 +04:00
|
|
|
cpdef list tokenize(self, unicode text)
|
2014-08-16 05:22:03 +04:00
|
|
|
|
2014-08-22 19:28:23 +04:00
|
|
|
cdef Word lookup(self, unicode string)
|
|
|
|
cdef list lookup_chunk(self, unicode chunk)
|
2014-08-16 05:22:03 +04:00
|
|
|
|
2014-08-22 19:28:23 +04:00
|
|
|
cdef list new_chunk(self, unicode string, list substrings)
|
|
|
|
cdef Word new_lexeme(self, unicode lex)
|
2014-08-16 05:22:03 +04:00
|
|
|
|
2014-08-20 15:39:39 +04:00
|
|
|
cpdef unicode unhash(self, StringHash hashed)
|
2014-07-07 14:47:21 +04:00
|
|
|
|
2014-08-20 15:39:39 +04:00
|
|
|
cpdef list find_substrings(self, unicode chunk)
|
2014-08-18 21:14:00 +04:00
|
|
|
cdef int find_split(self, unicode word)
|
2014-08-22 19:28:23 +04:00
|
|
|
cdef int set_orth(self, unicode string, Word word)
|