diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 536b3582b..8a7d12555 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -91,9 +91,9 @@ cdef class Doc: raise ValueError("Stepped slices not supported in Span objects." "Try: list(doc)[start:stop:step] instead.") if i.start is None: - i.start = 0 + i = slice(0, i.stop) if i.stop is None: - i.stop = len(self) + i = slice(i.start, len(self)) return Span(self, i.start, i.stop, label=0) if i < 0: