mirror of
https://github.com/qurator-spk/sbb_ner.git
synced 2025-06-09 12:20:00 +02:00
fix NER output; fix BERT Tokenizer
This commit is contained in:
parent
9bf2e6f51b
commit
3eabe5054a
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ def ner(model_id):
|
|||
if token == '[UNK]':
|
||||
orig_pos = len("".join([pred['word'] for pred in output_sentence]))
|
||||
|
||||
output_sentence.append({'word': original_text[orig_pos], 'prediction': 'O'})
|
||||
output_sentence.append({'word': original_text[orig_pos], 'prediction': last_prediction})
|
||||
continue
|
||||
|
||||
token = token[2:] if token.startswith('##') else token
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue