Open NLP-1217 opened 1 year ago
en_documents, en_labels, features, scores, vec_size, grids, en_paralabels = utils.getSamplesAndFeatures(in_file, embed_filename, title=title) pad_documents, pad_labels = utils.sentence_padding(en_documents, en_labels, max_len, vec_size)
File ~/workspace/Chinese-Essay-Dataset-For-Organization-Evaluation/utils.py:83, in loadDataAndFeature(in_file, title, max_len) 81 grid.append(para) 82 para = [] ---> 83 slen = max(1, round(load_dict['slen'][i]/20)) 84 para.extend([load_dict['gid'][i]]*slen) 85 if len(para) > 20:
KeyError: 'slen'
how to solve this problem
The problem has fixed in SongZiyao:patch-1 , that is waiting for merging to master.
en_documents, en_labels, features, scores, vec_size, grids, en_paralabels = utils.getSamplesAndFeatures(in_file, embed_filename, title=title) pad_documents, pad_labels = utils.sentence_padding(en_documents, en_labels, max_len, vec_size)
File ~/workspace/Chinese-Essay-Dataset-For-Organization-Evaluation/utils.py:83, in loadDataAndFeature(in_file, title, max_len) 81 grid.append(para) 82 para = [] ---> 83 slen = max(1, round(load_dict['slen'][i]/20)) 84 para.extend([load_dict['gid'][i]]*slen)
85 if len(para) > 20:
KeyError: 'slen'
how to solve this problem