コード例 #1
0
 def __init__(self, save_dir):
     self.path = utils.get_vocab_path(save_dir)
     self.max_size = 100
     self.vocab = {}
     if os.path.exists(self.path):
         self.vocab = json.load(open(self.path))
コード例 #2
0
 def __init__(self, model_dir, max_size):
     self.path = utils.get_vocab_path(model_dir)
     self.max_size = max_size
     self.vocab = {}
     if os.path.exists(self.path):
         self.vocab = json.load(open(self.path))