BERT_PATH ='上面解压好的文件夹的路径'tokenizer = BertTokenizer.from_pretrained(BERT_PATH)print(tokenizer.tokenize('I have a good time, thank you.')) bert = BertModel.from_pretrained(BERT_PATH)print('load bert model over') 输出: ['i','have','a','good','time',',','thank','you',...
max_length=5,max_length指定标记化文本**的长度。默认情况下,BERT执行单词片段标记化。例如,单词“p...