Allocate fused tokens array in GoldParseC

This commit is contained in:
Matthew Honnibal 2018-04-01 13:43:56 +02:00
parent d8dec1134c
commit 728d9841c7
2 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,7 @@ cdef struct GoldParseC:
int* sent_start
attr_t* labels
int** brackets
int* fused_tokens
int* fused
Transition* ner

View File

@ -442,6 +442,7 @@ cdef class GoldParse:
self.c.has_dep = <int*>self.mem.alloc(len(doc), sizeof(int))
self.c.sent_start = <int*>self.mem.alloc(len(doc), sizeof(int))
self.c.ner = <Transition*>self.mem.alloc(len(doc), sizeof(Transition))
self.c.fused = <int*>self.mem.alloc(len(doc), sizeof(int))
self.cats = {} if cats is None else dict(cats)
self.words = [None] * len(doc)