diff --git a/spacy/gold.pyx b/spacy/gold.pyx index c72c86876..82e6f589e 100644 --- a/spacy/gold.pyx +++ b/spacy/gold.pyx @@ -592,6 +592,16 @@ cdef class GoldParse: """ return self.length + def resize_arrays(self, int new_size): + # These are filled by the tagger/parser/entity recogniser + self.c.tags = self.mem.realloc(self.c.tags, new_size * sizeof(int)) + self.c.heads = self.mem.realloc(self.c.heads, new_size * sizeof(int)) + self.c.labels = self.mem.realloc(self.c.labels, new_size * sizeof(attr_t)) + self.c.has_dep = self.mem.realloc(self.c.has_dep, new_size * sizeof(int)) + self.c.sent_start = self.mem.realloc(self.c.sent_start, new_size * sizeof(int)) + self.c.ner = self.mem.realloc(self.c.ner, new_size * sizeof(Transition)) + self.c.fused = self.mem.realloc(self.c.fused, new_size * sizeof(int)) + @property def is_projective(self): """Whether the provided syntactic annotations form a projective