2015-02-22 08:32:07 +03:00
|
|
|
from cymem.cymem cimport Pool
|
2015-02-21 19:06:58 +03:00
|
|
|
|
2015-02-22 08:32:07 +03:00
|
|
|
from ..structs cimport TokenC
|
2015-02-21 19:06:58 +03:00
|
|
|
|
|
|
|
cdef class GoldParse:
|
2015-02-22 08:32:07 +03:00
|
|
|
cdef Pool mem
|
|
|
|
|
|
|
|
cdef int* c_heads
|
|
|
|
cdef int* c_labels
|
|
|
|
|
|
|
|
cdef int length
|
|
|
|
cdef int loss
|
|
|
|
|
2015-02-23 22:04:53 +03:00
|
|
|
cdef readonly unicode raw_text
|
|
|
|
cdef readonly list words
|
|
|
|
cdef readonly list ids
|
|
|
|
cdef readonly list tags
|
|
|
|
cdef readonly list heads
|
|
|
|
cdef readonly list labels
|
2015-02-22 08:32:07 +03:00
|
|
|
|
|
|
|
|
2015-02-21 19:06:58 +03:00
|
|
|
cdef int heads_correct(self, TokenC* tokens, bint score_punct=?) except -1
|