词云图出现问题:
1.文字处显示一个个小框框,无法显示中文文字
解决方法:设置可以显示的中文字体 font_path = '/System/Library/Fonts/Hiragino Sans GB.ttc'
jieba分词出现的问题:
1.dict.txt分词包和StopWords.txt暂停词包不存在
解决方法:自己从网上下载了相应的包
2.
解决方法:加上 encoding=‘gb18030’
with open('chineseStopWords.txt','r',encoding='gb18030') as ft: