mirror of https://github.com/explosion/spaCy.git
* Fix off-by-one in Parser.pipe
This commit is contained in:
parent
198f9aa034
commit
b04c9aad71
|
@ -125,9 +125,9 @@ cdef class Parser:
|
||||||
cdef int nr_feat = self.model.nr_feat
|
cdef int nr_feat = self.model.nr_feat
|
||||||
queue = []
|
queue = []
|
||||||
for doc in stream:
|
for doc in stream:
|
||||||
queue.append(doc)
|
|
||||||
doc_ptr[len(queue)] = doc.c
|
doc_ptr[len(queue)] = doc.c
|
||||||
lengths[len(queue)] = doc.length
|
lengths[len(queue)] = doc.length
|
||||||
|
queue.append(doc)
|
||||||
if len(queue) == batch_size:
|
if len(queue) == batch_size:
|
||||||
for i in cython.parallel.prange(batch_size, nogil=True,
|
for i in cython.parallel.prange(batch_size, nogil=True,
|
||||||
num_threads=n_threads):
|
num_threads=n_threads):
|
||||||
|
|
Loading…
Reference in New Issue