2015-02-22 05:32:07 +00:00
|
|
|
from cymem.cymem cimport Pool
|
2015-02-21 16:06:58 +00:00
|
|
|
|
2015-02-22 05:32:07 +00:00
|
|
|
from ..structs cimport TokenC
|
2015-03-09 05:46:22 +00:00
|
|
|
from .transition_system cimport Transition
|
|
|
|
|
2015-03-09 11:06:01 +00:00
|
|
|
cimport numpy
|
2015-02-21 16:06:58 +00:00
|
|
|
|
|
|
|
cdef class GoldParse:
|
2015-02-22 05:32:07 +00:00
|
|
|
cdef Pool mem
|
|
|
|
|
|
|
|
cdef int length
|
2015-03-09 05:46:22 +00:00
|
|
|
cdef readonly int loss
|
2015-03-09 11:06:01 +00:00
|
|
|
cdef readonly list tags
|
|
|
|
cdef readonly list heads
|
|
|
|
cdef readonly list labels
|
2015-03-24 03:27:20 +00:00
|
|
|
cdef readonly dict orths
|
2015-03-09 11:06:01 +00:00
|
|
|
cdef readonly list ner
|
2015-03-10 17:00:23 +00:00
|
|
|
cdef readonly list ents
|
2015-02-22 05:32:07 +00:00
|
|
|
|
2015-03-09 11:06:01 +00:00
|
|
|
cdef int* c_tags
|
2015-03-09 05:46:22 +00:00
|
|
|
cdef int* c_heads
|
|
|
|
cdef int* c_labels
|
2015-03-09 11:06:01 +00:00
|
|
|
cdef Transition* c_ner
|
2015-02-22 05:32:07 +00:00
|
|
|
|
2015-02-21 16:06:58 +00:00
|
|
|
cdef int heads_correct(self, TokenC* tokens, bint score_punct=?) except -1
|