mirror of https://github.com/explosion/spaCy.git
I think this fixes the segfault
This commit is contained in:
parent
318b9e32ff
commit
d59c6926c1
|
@ -40,7 +40,9 @@ cdef cppclass StateC:
|
||||||
this._ents[i].end = -1
|
this._ents[i].end = -1
|
||||||
this._sent[i].l_edge = i
|
this._sent[i].l_edge = i
|
||||||
this._sent[i].r_edge = i
|
this._sent[i].r_edge = i
|
||||||
for i in range(length, length + (PADDING * 2)):
|
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[i].lex = &EMPTY_LEXEME
|
||||||
this._sent += PADDING
|
this._sent += PADDING
|
||||||
this._ents += PADDING
|
this._ents += PADDING
|
||||||
|
@ -59,8 +61,6 @@ cdef cppclass StateC:
|
||||||
for i in range(length):
|
for i in range(length):
|
||||||
this._sent[i] = sent[i]
|
this._sent[i] = sent[i]
|
||||||
this._buffer[i] = i
|
this._buffer[i] = i
|
||||||
for i in range(length, length + 5):
|
|
||||||
this._sent[i].lex = &EMPTY_LEXEME
|
|
||||||
|
|
||||||
__dealloc__():
|
__dealloc__():
|
||||||
cdef int PADDING = 5
|
cdef int PADDING = 5
|
||||||
|
|
Loading…
Reference in New Issue