1
0
Fork 0
mirror of https://github.com/qurator-spk/sbb_ner.git synced 2025-06-09 12:20:00 +02:00

more correct interpretation of BERT tokens

This commit is contained in:
Kai Labusch 2019-12-13 11:17:45 +01:00
parent ba188d1daa
commit 29eb154fb8

View file

@ -238,6 +238,9 @@ def ner(model_id=None):
continue
if not token.startswith('##') and word_pred == 'X':
word_pred = 'O'
token = token[2:] if token.startswith('##') else token
word += token