From fab5d460f25a027b7b323aa8c140837a5a58f49f Mon Sep 17 00:00:00 2001 From: Kai Labusch Date: Tue, 19 May 2020 16:57:53 +0200 Subject: [PATCH] fix model output handling bug --- qurator/sbb_ner/webapp/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qurator/sbb_ner/webapp/app.py b/qurator/sbb_ner/webapp/app.py index 4a23ca0..8820a69 100644 --- a/qurator/sbb_ner/webapp/app.py +++ b/qurator/sbb_ner/webapp/app.py @@ -244,6 +244,9 @@ def ner(model_id=None): if not token.startswith('##') and word_pred == 'X': word_pred = 'O' + if word_pred == '[SEP]': + word_pred = 'O' + token = token[2:] if token.startswith('##') else token word += token