LeetTopic icon indicating copy to clipboard operation
LeetTopic copied to clipboard

AttributeError: 'TfidfVectorizer' object has no attribute 'get_feature_names'

Open fpichardom opened this issue 2 years ago • 2 comments

Installing leet-topic in a clean environment installs scikit-learn version 1.2.2, where the method get_feature_names is deprecated in favor of get_feature_names_out as shown in [scikit-learn version 1.1.3 documentation] (https://scikit-learn.org/1.1/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html?highlight=tfidfvectorizer#sklearn.feature_extraction.text.TfidfVectorizer). Therefore, running leet_df, topic_data = leet_topic.LeetTopic(...) would produce an AttributeError: 'TfidfVectorizer' object has no attribute 'get_feature_names'. Manually reverting the version of scikit-learn to 1.1.3 fixes the issue.

fpichardom avatar Jun 14 '23 16:06 fpichardom

Thanks for noting this. We actually just got out of a meeting where we are speaking about fixes and this is one of them that should be resolved shortly!

wjbmattingly avatar Jun 14 '23 16:06 wjbmattingly

Thanks! We have fixed this.

wjbmattingly avatar Aug 23 '23 15:08 wjbmattingly