📜  保存预处理文本 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:35.933000             🧑  作者: Mango

代码示例1
import pickle

# saving
with open('tokenizer.pickle', 'wb') as handle:
    pickle.dump(tokenizer, handle, protocol=pickle.HIGHEST_PROTOCOL)

# loading
with open('tokenizer.pickle', 'rb') as handle:
    tokenizer = pickle.load(handle)