code_3.py 215 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4
import matplotlib.pyplot as plt # 导入matplotlib
word_per_comment = [len(comment) for comment in X_train_tokenized_lst]
plt.hist(word_per_comment, bins = np.arange(0,500,10)) # 显示评论长度分布
plt.show()