diff --git a/spacy/ml/extract_spans.py b/spacy/ml/extract_spans.py index 8125c35f3..af6be78db 100644 --- a/spacy/ml/extract_spans.py +++ b/spacy/ml/extract_spans.py @@ -57,7 +57,7 @@ def _get_span_indices(ops, spans: Ragged, lengths: Ints1d) -> Ints1d: for i, length in enumerate(lengths): spans_i = spans[i].dataXd + offset for j in range(spans_i.shape[0]): - indices.extend(range(spans_i[j, 0], spans_i[j, 1])) + indices.extend(range(spans_i[j, 0], spans_i[j, 1])) # type: ignore[arg-type, call-overload] offset += length return ops.asarray1i(indices)