kpe / bert-for-tf2

A Keras TensorFlow 2.0 implementation of BERT, ALBERT and adapter-BERT.
https://github.com/kpe/bert-for-tf2
MIT License
803 stars 193 forks source link

KeyError: '[UNK]' #65

Open 2696120622 opened 4 years ago

2696120622 commented 4 years ago

albert tokenization /usr/local/lib/python3.6/dist-packages/bert/tokenization/albert_tokenization.py in convert_by_vocab(vocab, items) 209 output = [] 210 for item in items: --> 211 output.append(vocab[item]) 212 return output 213

KeyError: '[UNK]'