From f8fce6c03c0a8e089607c0e2eb59fc252171a487 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 6 May 2019 15:02:11 +0200 Subject: [PATCH] Fix typo (see #3681) --- examples/information_extraction/entity_relations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/information_extraction/entity_relations.py b/examples/information_extraction/entity_relations.py index 593324134..06721708a 100644 --- a/examples/information_extraction/entity_relations.py +++ b/examples/information_extraction/entity_relations.py @@ -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))