def get_wordcloud(file_path):
with open(file_path, 'r') as f:
text = f.read()
wordcloud = WordCloud(max_font_size=200, min_font_size=25, prefer_horizontal=1, background_color='white', margin=0,
relative_scaling=0.5, colormap='copper', collocations=False, width=1600, height=800).generate(text)
plt.figure()
plt.imshow(wordcloud, interpolation="bilinear")
plt.axis("off")
plt.show()
util_csl.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录