Separius / BERT-keras

Keras implementation of BERT with pre-trained weights
GNU General Public License v3.0
813 stars 196 forks source link

name 'spm' is not defined #2

Closed HappyLife-together closed 5 years ago

HappyLife-together commented 5 years ago

Traceback (most recent call last): File "tutorial.py", line 6, in model_name='tutorial', vocab_size=20) File "/media/bin_lab/C4F6073207B3A949/Linux/Bert/BERT-keras-master/data/vocab.py", line 59, in init spm.SentencePieceTrainer.Train( NameError: name 'spm' is not defined

Separius commented 5 years ago

oh, I should have created a requirements file in order to use sentencepiece encoder you need sentencepiece package you can install it with: pip install sentencepiece