mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix setting of empty lexeme in initial parse state
This commit is contained in:
parent
d864708072
commit
c79b3129e3
|
@ -42,8 +42,6 @@ cdef cppclass StateC:
|
||||||
this._sent[i].r_edge = i
|
this._sent[i].r_edge = i
|
||||||
for i in range(PADDING):
|
for i in range(PADDING):
|
||||||
this._sent[i].lex = &EMPTY_LEXEME
|
this._sent[i].lex = &EMPTY_LEXEME
|
||||||
for i in range(length, PADDING):
|
|
||||||
this._sent[i].lex = &EMPTY_LEXEME
|
|
||||||
this._sent += PADDING
|
this._sent += PADDING
|
||||||
this._ents += PADDING
|
this._ents += PADDING
|
||||||
this._buffer += PADDING
|
this._buffer += PADDING
|
||||||
|
@ -61,6 +59,8 @@ 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+PADDING):
|
||||||
|
this._sent[i].lex = &EMPTY_LEXEME
|
||||||
|
|
||||||
__dealloc__():
|
__dealloc__():
|
||||||
cdef int PADDING = 5
|
cdef int PADDING = 5
|
||||||
|
|
Loading…
Reference in New Issue
Block a user