Fix setting of empty lexeme in initial parse state

This commit is contained in:
Matthew Honnibal 2017-03-15 09:26:53 -05:00
parent d864708072
commit c79b3129e3

View File

@ -42,8 +42,6 @@ cdef cppclass StateC:
this._sent[i].r_edge = i
for i in range(PADDING):
this._sent[i].lex = &EMPTY_LEXEME
for i in range(length, PADDING):
this._sent[i].lex = &EMPTY_LEXEME
this._sent += PADDING
this._ents += PADDING
this._buffer += PADDING
@ -61,6 +59,8 @@ cdef cppclass StateC:
for i in range(length):
this._sent[i] = sent[i]
this._buffer[i] = i
for i in range(length, length+PADDING):
this._sent[i].lex = &EMPTY_LEXEME
__dealloc__():
cdef int PADDING = 5