From 8bbf31a582fad1885d520bb997159de08d9ef2d5 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 24 Jun 2020 18:03:44 +0200 Subject: [PATCH] Output unlabelled spans from O biluo tags in iob_utils --- spacy/gold/iob_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/gold/iob_utils.py b/spacy/gold/iob_utils.py index 3ae911418..f934bc013 100644 --- a/spacy/gold/iob_utils.py +++ b/spacy/gold/iob_utils.py @@ -181,6 +181,8 @@ def tags_to_entities(tags): # TODO: We shouldn't be getting these malformed inputs. Fix this. if start is not None: start = None + else: + entities.append(("", i, i)) continue elif tag == "-": continue