fix model output handling bug

pull/2/head
Kai Labusch 4 years ago
parent 319c29fc96
commit fab5d460f2

@ -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

Loading…
Cancel
Save