def _dump_data(self, dataset_path): for group in ['knowledge', 'source', 'target']: if getattr(self, group + '_format') != 'none': dump_data(dataset_path, getattr(self, group + '_text_data'), suffix=group + '.') dump_data(dataset_path, idx2token=self.idx2token, token2idx=self.token2idx) self.logger.info("Dump finished!")
def _dump_data(self, dataset_path): dump_data(dataset_path, self.source_text_data, self.source_idx2token, self.source_token2idx, self.source_suffix + '.') dump_data(dataset_path, self.target_text_data, self.target_idx2token, self.target_token2idx, self.target_suffix + '.') self.logger.info("Dump finished!")
def _dump_data(self, dataset_path): dump_data(dataset_path, self.text_data, self.idx2token, self.token2idx) self.logger.info("Dump finished!")
def _dump_data(self, dataset_path): dump_data(dataset_path, self.text_data, self.idx2token, self.token2idx, 'corpus.') dump_data(dataset_path, self.attribute_data, self.idx2attribute, self.attribute2idx, 'attribute.') self.logger.info("Dump finished!")