Skip to content

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

Description

@fpichardom

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions