mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix typo (see #3681)
This commit is contained in:
parent
f2a56c1b56
commit
f8fce6c03c
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user