2014-11-05 11:55:10 +03:00
|
|
|
from thinc.typedefs cimport atom_t
|
|
|
|
from .typedefs cimport hash_t
|
|
|
|
from .tokens cimport Tokens
|
|
|
|
from .lexeme cimport Lexeme
|
|
|
|
|
|
|
|
|
2014-11-05 12:45:29 +03:00
|
|
|
cdef class Token:
|
2014-11-05 14:11:39 +03:00
|
|
|
cdef readonly atom_t sic
|
|
|
|
cdef readonly atom_t cluster
|
|
|
|
cdef readonly atom_t norm
|
2014-11-05 12:45:29 +03:00
|
|
|
cdef readonly atom_t shape
|
2014-11-05 14:11:39 +03:00
|
|
|
cdef readonly atom_t asciied
|
|
|
|
cdef readonly atom_t prefix
|
|
|
|
cdef readonly atom_t suffix
|
|
|
|
cdef readonly atom_t length
|
|
|
|
|
|
|
|
cdef readonly atom_t postype
|
|
|
|
cdef readonly atom_t nertype
|
|
|
|
cdef readonly atom_t sensetype
|
|
|
|
|
2014-11-05 12:45:29 +03:00
|
|
|
cdef readonly atom_t is_alpha
|
2014-11-05 14:11:39 +03:00
|
|
|
cdef readonly atom_t is_ascii
|
2014-11-05 12:45:29 +03:00
|
|
|
cdef readonly atom_t is_digit
|
2014-11-05 14:11:39 +03:00
|
|
|
cdef readonly atom_t is_lower
|
|
|
|
cdef readonly atom_t is_punct
|
|
|
|
cdef readonly atom_t is_space
|
2014-11-05 12:45:29 +03:00
|
|
|
cdef readonly atom_t is_title
|
|
|
|
cdef readonly atom_t is_upper
|
2014-11-05 14:11:39 +03:00
|
|
|
cdef readonly atom_t like_url
|
|
|
|
cdef readonly atom_t like_number
|
|
|
|
cdef readonly atom_t oft_lower
|
|
|
|
cdef readonly atom_t oft_title
|
|
|
|
cdef readonly atom_t oft_upper
|
2014-11-05 12:45:29 +03:00
|
|
|
|
2014-11-05 14:11:39 +03:00
|
|
|
cdef readonly atom_t in_males
|
|
|
|
cdef readonly atom_t in_females
|
|
|
|
cdef readonly atom_t in_surnames
|
|
|
|
cdef readonly atom_t in_places
|
|
|
|
cdef readonly atom_t in_games
|
|
|
|
cdef readonly atom_t in_celebs
|
|
|
|
cdef readonly atom_t in_names
|
2014-11-05 12:45:29 +03:00
|
|
|
|
|
|
|
cdef readonly atom_t pos
|
2014-11-05 14:11:39 +03:00
|
|
|
cdef readonly atom_t sense
|
2014-11-05 12:45:29 +03:00
|
|
|
cdef readonly atom_t ner
|
|
|
|
|
|
|
|
|
|
|
|
cdef class Slots:
|
2014-11-06 20:40:36 +03:00
|
|
|
cdef readonly Token P4
|
|
|
|
cdef readonly Token P3
|
2014-11-05 12:45:29 +03:00
|
|
|
cdef readonly Token P2
|
|
|
|
cdef readonly Token P1
|
|
|
|
cdef readonly Token N0
|
|
|
|
cdef readonly Token N1
|
|
|
|
cdef readonly Token N2
|
2014-11-06 20:40:36 +03:00
|
|
|
cdef readonly Token N3
|
|
|
|
cdef readonly Token N4
|
2014-11-05 12:45:29 +03:00
|
|
|
|
|
|
|
|
2014-11-05 11:55:10 +03:00
|
|
|
cdef int N_FIELDS
|
|
|
|
|
|
|
|
|
2014-11-09 07:43:07 +03:00
|
|
|
cdef int fill_context(atom_t* context, int i, Tokens tokens) except -1
|
2014-11-05 12:45:29 +03:00
|
|
|
|
2014-11-05 11:55:10 +03:00
|
|
|
|
2014-11-05 12:45:29 +03:00
|
|
|
cpdef Slots FIELD_IDS
|