From 83ffd164740f1631814152dcefc0bbf2d5985c80 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 22 May 2017 08:00:53 -0500 Subject: [PATCH] Fix offset calculation for other negative values --- spacy/pipeline.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index 7eb75953a..d319c05f2 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -354,7 +354,7 @@ cdef class NeuralEntityRecognizer(NeuralParser): for j in range(6): if ids[i, j] >= state.c.length: ids[i, j] = -1 - if ids[i, j] != -1: + if ids[i, j] >= 0: ids[i, j] += state.c.offset return ids