Fix typo (see #3681)

This commit is contained in:
Ines Montani 2019-05-06 15:02:11 +02:00
parent f2a56c1b56
commit f8fce6c03c

View File

@ -42,7 +42,7 @@ def filter_spans(spans, prefer_longest=True):
sorted_spans = sorted(spans, key=get_sort_key, reverse=prefer_longest)
result = []
seen_tokens = set()
for span in spans:
for span in sorted_spans:
if span.start not in seen_tokens and span.end - 1 not in seen_tokens:
result.append(span)
seen_tokens.update(range(span.start, span.end))