From b04c9aad71f217771bb3680dad6cde99445da683 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 5 Feb 2016 19:37:50 +0100 Subject: [PATCH] * Fix off-by-one in Parser.pipe --- spacy/syntax/parser.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index c62ba6c6f..bc10e7776 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -125,9 +125,9 @@ cdef class Parser: cdef int nr_feat = self.model.nr_feat queue = [] for doc in stream: - queue.append(doc) doc_ptr[len(queue)] = doc.c lengths[len(queue)] = doc.length + queue.append(doc) if len(queue) == batch_size: for i in cython.parallel.prange(batch_size, nogil=True, num_threads=n_threads):