2014-09-11 18:57:08 +04:00
|
|
|
from spacy.lexeme cimport LexemeC
|
2014-09-15 05:22:40 +04:00
|
|
|
from libcpp.vector cimport vector
|
2014-09-11 18:57:08 +04:00
|
|
|
|
|
|
|
|
2014-09-15 05:22:40 +04:00
|
|
|
cdef class Tokens:
|
|
|
|
cdef vector[LexemeC*] v
|
2014-09-10 20:11:13 +04:00
|
|
|
|
2014-09-15 05:22:40 +04:00
|
|
|
cpdef size_t id(self, size_t i) except 0
|
2014-09-10 20:11:13 +04:00
|
|
|
cpdef unicode string(self, size_t i)
|
2014-09-15 05:22:40 +04:00
|
|
|
cpdef double prob(self, size_t i) except 1
|
|
|
|
cpdef size_t cluster(self, size_t i) except *
|
|
|
|
cpdef bint check_flag(self, size_t i, size_t flag_id) except *
|
2014-09-10 20:11:13 +04:00
|
|
|
cpdef unicode string_view(self, size_t i, size_t view_id)
|
2014-09-15 03:31:44 +04:00
|
|
|
|
2014-09-15 05:22:40 +04:00
|
|
|
cpdef size_t canon(self, size_t i) except 0
|
|
|
|
cpdef size_t shape(self, size_t i) except 0
|
|
|
|
cpdef size_t non_sparse(self, size_t i) except 0
|
|
|
|
cpdef size_t asciied(self, size_t i) except 0
|
2014-09-15 03:31:44 +04:00
|
|
|
cpdef unicode canon_string(self, size_t i)
|
2014-09-15 05:22:40 +04:00
|
|
|
cpdef unicode shape_string(self, size_t i)
|
2014-09-15 03:31:44 +04:00
|
|
|
cpdef unicode non_sparse_string(self, size_t i)
|
|
|
|
cpdef unicode asciied_string(self, size_t i)
|
2014-09-15 05:22:40 +04:00
|
|
|
cpdef bint is_alpha(self, size_t i) except *
|
|
|
|
cpdef bint is_ascii(self, size_t i) except *
|
|
|
|
cpdef bint is_digit(self, size_t i) except *
|
|
|
|
cpdef bint is_lower(self, size_t i) except *
|
|
|
|
cpdef bint is_punct(self, size_t i) except *
|
|
|
|
cpdef bint is_space(self, size_t i) except *
|
|
|
|
cpdef bint is_title(self, size_t i) except *
|
|
|
|
cpdef bint is_upper(self, size_t i) except *
|
|
|
|
cpdef bint can_adj(self, size_t i) except *
|
|
|
|
cpdef bint can_adp(self, size_t i) except *
|
|
|
|
cpdef bint can_adv(self, size_t i) except *
|
|
|
|
cpdef bint can_conj(self, size_t i) except *
|
|
|
|
cpdef bint can_det(self, size_t i) except *
|
|
|
|
cpdef bint can_noun(self, size_t i) except *
|
|
|
|
cpdef bint can_num(self, size_t i) except *
|
|
|
|
cpdef bint can_pdt(self, size_t i) except *
|
|
|
|
cpdef bint can_pos(self, size_t i) except *
|
|
|
|
cpdef bint can_pron(self, size_t i) except *
|
|
|
|
cpdef bint can_prt(self, size_t i) except *
|
|
|
|
cpdef bint can_punct(self, size_t i) except *
|
|
|
|
cpdef bint can_verb(self, size_t i) except *
|
|
|
|
cpdef bint oft_lower(self, size_t i) except *
|
|
|
|
cpdef bint oft_title(self, size_t i) except *
|
|
|
|
cpdef bint oft_upper(self, size_t i) except *
|