From 8c4d1b46ce6f8227065dce208f4f7ba3dd56ae62 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 1 Nov 2016 13:27:44 +0100 Subject: [PATCH] Fix variable error in Span --- spacy/tokens/span.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tokens/span.pyx b/spacy/tokens/span.pyx index d3958242e..c55de3c3e 100644 --- a/spacy/tokens/span.pyx +++ b/spacy/tokens/span.pyx @@ -31,7 +31,7 @@ cdef class Span: Returns: Span The newly constructed object. ''' - if not (0 <= start <= end <= len(tokens)): + if not (0 <= start <= end <= len(doc)): raise IndexError self.doc = doc