2015-02-22 05:32:07 +00:00
|
|
|
from cymem.cymem cimport Pool
|
2015-02-21 16:06:58 +00:00
|
|
|
|
2017-05-28 12:06:40 +00:00
|
|
|
from .typedefs cimport attr_t
|
2015-05-24 19:35:02 +00:00
|
|
|
from .syntax.transition_system cimport Transition
|
2015-03-09 05:46:22 +00:00
|
|
|
|
2020-03-02 10:48:10 +00:00
|
|
|
from .tokens import Doc
|
|
|
|
|
2015-06-02 18:01:06 +00:00
|
|
|
|
|
|
|
cdef struct GoldParseC:
|
|
|
|
int* tags
|
|
|
|
int* heads
|
2017-05-30 18:37:24 +00:00
|
|
|
int* has_dep
|
2017-08-26 01:03:14 +00:00
|
|
|
int* sent_start
|
2017-05-28 12:06:40 +00:00
|
|
|
attr_t* labels
|
2015-06-02 18:01:06 +00:00
|
|
|
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
|
2019-11-11 16:35:27 +00:00
|
|
|
cdef readonly TokenAnnotation orig
|
2015-06-02 18:01:06 +00:00
|
|
|
|
2015-02-22 05:32:07 +00:00
|
|
|
cdef int length
|
2017-05-22 09:50:29 +00:00
|
|
|
cdef public int loss
|
|
|
|
cdef public list words
|
|
|
|
cdef public list tags
|
2020-01-28 10:36:29 +00:00
|
|
|
cdef public list pos
|
2019-11-25 15:03:28 +00:00
|
|
|
cdef public list morphs
|
2019-11-28 13:53:44 +00:00
|
|
|
cdef public list lemmas
|
2019-11-28 10:10:07 +00:00
|
|
|
cdef public list sent_starts
|
2017-05-22 09:50:29 +00:00
|
|
|
cdef public list heads
|
|
|
|
cdef public list labels
|
|
|
|
cdef public dict orths
|
|
|
|
cdef public list ner
|
|
|
|
cdef public dict brackets
|
2019-11-11 16:35:27 +00:00
|
|
|
cdef public dict cats
|
2019-07-17 15:18:26 +00:00
|
|
|
cdef public dict links
|
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
|
2019-11-11 16:35:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
cdef class TokenAnnotation:
|
|
|
|
cdef public list ids
|
|
|
|
cdef public list words
|
|
|
|
cdef public list tags
|
2020-01-28 10:36:29 +00:00
|
|
|
cdef public list pos
|
|
|
|
cdef public list morphs
|
|
|
|
cdef public list lemmas
|
2019-11-11 16:35:27 +00:00
|
|
|
cdef public list heads
|
|
|
|
cdef public list deps
|
|
|
|
cdef public list entities
|
2019-11-25 15:03:28 +00:00
|
|
|
cdef public list sent_starts
|
2020-05-20 16:48:18 +00:00
|
|
|
cdef public dict brackets_by_start
|
2019-11-11 16:35:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
cdef class DocAnnotation:
|
|
|
|
cdef public object cats
|
|
|
|
cdef public object links
|
|
|
|
|
|
|
|
|
|
|
|
cdef class Example:
|
|
|
|
cdef public object doc
|
2019-11-25 15:03:28 +00:00
|
|
|
cdef public TokenAnnotation token_annotation
|
2019-11-11 16:35:27 +00:00
|
|
|
cdef public DocAnnotation doc_annotation
|
|
|
|
cdef public object goldparse
|