我有些困惑,我想使用texthero库进行一些主成分分析。但是当我尝试运行我的代码时:
import texthero as hero
import pandas as pd
df['pca']=(df['clean_tweet'].pipe(hero.clean).pipe(hero.do_tfidf).pipe(hero.do_pca))
hero.scatterplot(df, col='pca', color='topic', title="PCA BBC Sport news")
我遇到了错误:
ModuleNotFoundError: No module named 'gensim.sklearn_api
但是当我输入 !pip show gensim 时,我得到了以下结果:
Name: gensim
Version: 4.0.1
Summary: Python framework for fast Vector Space Modelling
Home-page: http://radimrehurek.com/gensim