2015-02-22 05:32:07 +00:00
|
|
|
from cymem.cymem cimport Pool
|
2015-02-21 16:06:58 +00:00
|
|
|
|
2015-05-24 19:35:02 +00:00
|
|
|
from .structs cimport TokenC
|
|
|
|
from .syntax.transition_system cimport Transition
|
2015-03-09 05:46:22 +00:00
|
|
|
|
2015-03-09 11:06:01 +00:00
|
|
|
cimport numpy
|
2015-02-21 16:06:58 +00:00
|
|
|
|
2015-06-02 18:01:06 +00:00
|
|
|
|
|
|
|
cdef struct GoldParseC:
|
|
|
|
int* tags
|
|
|
|
int* heads
|
|
|
|
int* labels
|
|
|
|
int** brackets
|
|
|
|
Transition* ner
|
|
|
|
|
|
|
|
|
2015-02-21 16:06:58 +00:00
|
|
|
cdef class GoldParse:
|
2015-02-22 05:32:07 +00:00
|
|
|
cdef Pool mem
|
|
|
|
|
2015-06-02 18:01:06 +00:00
|
|
|
cdef GoldParseC c
|
|
|
|
|
2015-02-22 05:32:07 +00:00
|
|
|
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-05-11 14:12:03 +00:00
|
|
|
cdef readonly dict brackets
|
2015-02-22 05:32:07 +00:00
|
|
|
|
2015-05-24 15:35:49 +00:00
|
|
|
cdef readonly list cand_to_gold
|
|
|
|
cdef readonly list gold_to_cand
|
|
|
|
cdef readonly list orig_annot
|
|
|
|
|
2015-06-02 18:01:06 +00:00
|
|
|
|