From 5b218430dc1edf7a6c47aa2a4971b7abe1823188 Mon Sep 17 00:00:00 2001 From: Kai Labusch Date: Fri, 13 Dec 2019 15:08:44 +0100 Subject: [PATCH] more correct interpretation of BERT tokens --- 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 9c92e17..4a23ca0 100644 --- a/qurator/sbb_ner/webapp/app.py +++ b/qurator/sbb_ner/webapp/app.py @@ -236,6 +236,9 @@ def ner(model_id=None): word += original_text[orig_pos] + if word_pred != 'X': + last_prediction = word_pred + continue if not token.startswith('##') and word_pred == 'X':