Skip to content

AttributeError: 'CountVectorizer' object has no attribute 'get_feature_names' #19

@shelbywhite

Description

@shelbywhite

Trying to run this code on Google Colab and seeing this error now. Simply just trying to use the demo provided in this repo, but now it's throwing the following error:


AttributeError Traceback (most recent call last)
in
3 # Fit the Concept model to the images and vocabulary
4 concept_model = ConceptModel()
----> 5 concepts = concept_model.fit_transform(img_names, docs=selected_nouns)
6
7 # Get the predicted probabilities for each concept cluster for each image

1 frames
/usr/local/lib/python3.9/dist-packages/concept/_model.py in _extract_textual_representation(self, docs)
400 # Extract vocabulary from the documents
401 self.vectorizer_model.fit(docs)
--> 402 words = self.vectorizer_model.get_feature_names()
403
404 # Embed the documents and extract similarity between concept clusters and words

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

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