From b65633f2706b2ac40aba42c1b9641ef6043610ac Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 7 Nov 2015 05:29:11 +1100 Subject: [PATCH] * Fix function that returns nth entity in StateClass. Was only returning the first. --- spacy/syntax/stateclass.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/syntax/stateclass.pyx b/spacy/syntax/stateclass.pyx index 81c31be97..66a37c31b 100644 --- a/spacy/syntax/stateclass.pyx +++ b/spacy/syntax/stateclass.pyx @@ -48,7 +48,7 @@ cdef class StateClass: return 0 if i < 0 or i >= self.length: return 0 - return self._ents[self._e_i-1].start + self._ents[self._e_i - (i+1)].start cdef int L(self, int i, int idx) nogil: if idx < 1: