2015-02-22 08:32:07 +03:00
|
|
|
from cymem.cymem cimport Pool
|
2015-02-21 19:06:58 +03:00
|
|
|
|
2015-05-24 22:35:02 +03:00
|
|
|
from .structs cimport TokenC
|
2017-05-28 15:06:40 +03:00
|
|
|
from .typedefs cimport attr_t
|
2015-05-24 22:35:02 +03:00
|
|
|
from .syntax.transition_system cimport Transition
|
2015-03-09 08:46:22 +03:00
|
|
|
|
2015-06-02 21:01:06 +03:00
|
|
|
|
|
|
|
cdef struct GoldParseC:
|
|
|
|
int* tags
|
|
|
|
int* heads
|
2017-05-30 21:37:24 +03:00
|
|
|
int* has_dep
|
2017-05-28 15:06:40 +03:00
|
|
|
attr_t* labels
|
2015-06-02 21:01:06 +03:00
|
|
|
int** brackets
|
|
|
|
Transition* ner
|
|
|
|
|
|
|
|
|
2015-02-21 19:06:58 +03:00
|
|
|
cdef class GoldParse:
|
2015-02-22 08:32:07 +03:00
|
|
|
cdef Pool mem
|
|
|
|
|
2015-06-02 21:01:06 +03:00
|
|
|
cdef GoldParseC c
|
|
|
|
|
2015-02-22 08:32:07 +03:00
|
|
|
cdef int length
|
2017-05-22 12:50:29 +03:00
|
|
|
cdef public int loss
|
|
|
|
cdef public list words
|
|
|
|
cdef public list tags
|
|
|
|
cdef public list heads
|
|
|
|
cdef public list labels
|
|
|
|
cdef public dict orths
|
|
|
|
cdef public list ner
|
|
|
|
cdef public list ents
|
|
|
|
cdef public dict brackets
|
2017-07-20 01:17:47 +03:00
|
|
|
cdef public object cats
|
2015-02-22 08:32:07 +03:00
|
|
|
|
2015-05-24 18:35:49 +03:00
|
|
|
cdef readonly list cand_to_gold
|
|
|
|
cdef readonly list gold_to_cand
|
|
|
|
cdef readonly list orig_annot
|
|
|
|
|
2015-06-02 21:01:06 +03:00
|
|
|
|