1.微博的关键词大数据采集;
已完成,待优化
2.LDA
错误1:使用了import pyLDAvis.sklearn,提示没有模块no module named 'pyldavis.sklearn'。
默认安装 pyLDAvis==3.4.1,最后降级处理,解决方式:
pip install pyLDAvis==3.2.2
错误2: return vectorizer.get_feature_names()
AttributeError: 'CountVectorizer' object has no attribute 'get_feature_names'
解决方式:修改为:return vectorizer.get_feature_names_out()
错误3:
pyLDAvis\_prepare.py", line 247, in _topic_info
default_term_info = default_term_info.sort_values(
TypeError: drop() takes from 1 to 2 positional arguments but 3 were given
解决方式:
修改_prepare.py文件 ,
将248行代码改为drop(‘saliency’, 1) ==> drop(‘saliency’, axis=1)
错误4:OSError: [Errno 22] Invalid argument: 'https://cdn.jsdelivr.net/gh/bmabey/py
修改报错处,即_display.py的227.py,local=True改为local=False
参考链接:LDA代码训练报错记录_typeerror: drop() takes from 1 to 2 positional arg-CSDN博客
pyLDAvis生成LDA主题并可视化_py ldavis 库-CSDN博客
pyLDAvis实现LDA结果可视化时报错OSError:invalid argument_python pyldavis.show() 报错-CSDN博客
已解决AttributeError: ‘CountVectorizer‘ object has no attribute ‘get_feature_names‘_countvectorizer' object has no attribute 'get_feat-CSDN博客
整出LDA图,流程跑出来了,待优化。(数据清洗,调参,其他方法,需要优化)