Add some property vars for testing

This commit is contained in:
Matthew Honnibal 2018-04-03 15:44:31 +02:00
parent 4029dc2cc7
commit e31ef9c7f6
2 changed files with 8 additions and 0 deletions

View File

@ -517,6 +517,10 @@ cdef class GoldParse:
"""
return self.length
@property
def fused(self):
return [self.c.fused[i] for i in range(self.length)]
def resize_arrays(self, int new_size):
# These are filled by the tagger/parser/entity recogniser
self.c.tags = <int*>self.mem.realloc(self.c.tags, new_size * sizeof(int))

View File

@ -64,6 +64,10 @@ cdef class StateClass:
doc.length = self.c.length
return doc
@property
def buffer_length(self):
return self.c.buffer_length
@property
def stack(self):
return [self.S(i) for i in range(self.c._s_i)]