mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
16 lines
459 B
Cython
16 lines
459 B
Cython
from spacy.lexeme cimport LexemeC
|
|
|
|
cdef class Tokens:
|
|
cdef size_t length
|
|
cdef size_t size
|
|
|
|
cdef LexemeC** lexemes
|
|
cdef int push_back(self, LexemeC* lexeme) except -1
|
|
|
|
cpdef size_t id(self, size_t i)
|
|
cpdef unicode string(self, size_t i)
|
|
cpdef double prob(self, size_t i)
|
|
cpdef size_t cluster(self, size_t i)
|
|
cpdef bint check_flag(self, size_t i, size_t flag_id)
|
|
cpdef unicode string_view(self, size_t i, size_t view_id)
|