Im little confuse i would like use texthero library for some pca analysis. But when i trying run my code :
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")
I get error:
ModuleNotFoundError: No module named 'gensim.sklearn_api
But when i put !pip show gensim. i got
Name: gensim
Version: 4.0.1
Summary: Python framework for fast Vector Space Modelling
Home-page: http://radimrehurek.com/gensim
It seems that the module "gensim.sklearn_api" has been removed with version 4 of Gensim. Try downgrading Gensim's version.
python -m pip install gensim==3.8.3
Reference: https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With