mirror of
https://github.com/qurator-spk/sbb_ner.git
synced 2025-06-09 20:30:01 +02:00
more correct interpretation of BERT tokens
This commit is contained in:
parent
29eb154fb8
commit
5b218430dc
1 changed files with 3 additions and 0 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue