def save(self):
    data = {'max_ori_len': self.max_ori_len, 'max_sum_len': (self.max_sum_len + 1), 'dict': {'dict': self.dict.word2idx, 'dict_size': len(self.dict)}, 'train': {'original': word2idx(self.train_origins, self.dict.word2idx), 'summary': word2idx(self.train_summurys, self.dict.word2idx), 'label': self.train_labels}, 'test': {'original': word2idx(self.test_origins, self.dict.word2idx), 'summary': word2idx(self.test_summurys, self.dict.word2idx), 'label': self.test_labels}}
    middle_save(data, 'data/corpus')
    print('dict length - [{}]'.format(len(self.dict)))
def save(self):
    data = {'max_ori_len': self.max_ori_len, 'max_sum_len': (self.max_sum_len + 1), 'dict': {'dict': self.dict.word2idx, 'dict_size': len(self.dict)}, 'train': {'original': word2idx(self.train_origins, self.dict.word2idx), 'summary': word2idx(self.train_summurys, self.dict.word2idx), 'label': self.train_labels}, 'test': {'original': word2idx(self.test_origins, self.dict.word2idx), 'summary': word2idx(self.test_summurys, self.dict.word2idx), 'label': self.test_labels}}
    middle_save(data, 'data/corpus')
    print('dict length - [{}]'.format(len(self.dict)))