今日学习了python的词云技术 from os import path from wordcloud import WordCloud import matplotlib.pyplot as plt d=path.dirname(__file__) text=open(path.join(d,"data//constitution.txt")).read() # 步骤3-2:设置一张词云图对象 wordcloud = WordCloud(background_color="
# 使用Python进行词频统计 mytext = """Background Industrial Light & Magic (ILM) was started by filmmaker George Lucas, . ILM has won numerous Academy Awards for Best Visual Effects, not to mention a string of Clio awards for its work on televisi
import jieba from nltk import * from wordcloud import WordCloud import matplotlib.pyplot as plt words = [] with open('对共享单车的看法.txt', 'r') as f: for line in f.readlines(): seg_list = jieba.cut(line, cut_all=False) for w in seg_list: words.append(w) f.