def load_data(path):
n_lines = count_lines(path)
bar = progressbar.ProgressBar()
train = []
test = []
print('loading...: %s' % path)
with open(path) as f:
i = 0
for line in bar(f, max_value=n_lines):
words = line.strip().split()
if i < 1000:
test.append(np.array(words))
i+=1
else:
train.append(np.array(words))
return train, test
评论列表
文章目录