From 728d9841c795fea8b40c1f621917d1b51cd096b6 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 1 Apr 2018 13:43:56 +0200 Subject: [PATCH] Allocate fused tokens array in GoldParseC --- spacy/gold.pxd | 2 +- spacy/gold.pyx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/gold.pxd b/spacy/gold.pxd index bf587c82a..0a689ac62 100644 --- a/spacy/gold.pxd +++ b/spacy/gold.pxd @@ -12,7 +12,7 @@ cdef struct GoldParseC: int* sent_start attr_t* labels int** brackets - int* fused_tokens + int* fused Transition* ner diff --git a/spacy/gold.pyx b/spacy/gold.pyx index 45eaa67cf..46f16a229 100644 --- a/spacy/gold.pyx +++ b/spacy/gold.pyx @@ -442,6 +442,7 @@ cdef class GoldParse: self.c.has_dep = self.mem.alloc(len(doc), sizeof(int)) self.c.sent_start = self.mem.alloc(len(doc), sizeof(int)) self.c.ner = self.mem.alloc(len(doc), sizeof(Transition)) + self.c.fused = self.mem.alloc(len(doc), sizeof(int)) self.cats = {} if cats is None else dict(cats) self.words = [None] * len(doc)