From a422a4e2d6fe4f0c96b859e41343d2a896ecc85a Mon Sep 17 00:00:00 2001 From: Yige XU Date: Mon, 23 Jul 2018 00:14:50 +0800 Subject: [PATCH] Update preprocess.py --- fastNLP/loader/preprocess.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastNLP/loader/preprocess.py b/fastNLP/loader/preprocess.py index ec70db88..338318ea 100644 --- a/fastNLP/loader/preprocess.py +++ b/fastNLP/loader/preprocess.py @@ -75,6 +75,7 @@ class POSPreprocess(BasePreprocess): else: with open(os.path.join(self.pickle_path, "class2id.pkl"), "wb") as f: _pickle.dump(self.label2index, f) + #something will be wrong if word2id.pkl is found but class2id.pkl is not found if not self.pickle_exist("id2word.pkl"): index2word = self.build_reverse_dict(self.word2index)