MaartenGr / BERTopic

Leveraging BERT and c-TF-IDF to create easily interpretable topics.
https://maartengr.github.io/BERTopic/
MIT License
5.76k stars 716 forks source link

I'm trying to use zeroshot topic model,but i encounter an error,Can anyone please help me?TypeError: BERTopic.__init__() got an unexpected keyword argument 'zeroshot_topic_list' #2025

Open luyixiao31 opened 1 month ago

luyixiao31 commented 1 month ago

my bertopic version is bertopicv0.16.2


TypeError Traceback (most recent call last) Cell In[162], line 57 55 keybert_model = KeyBERTInspired() 56 # build BERTopic ---> 57 topic_model = BERTopic( 58 embedding_model=embedding_model, 59 vectorizer_model=vectorizer_model, 60 # umap_model=umap_model, 61 # hdbscan_model=hdbscan_model, 62 zeroshot_topic_list = zeroshot_topic_list, 63 # seed_topic_list=seed_topic_list, 64 # representation_model=keybert_model 68 # # 69 topics, probs = topic_model.fit_transform(docs, embeddings=embeddings) #

TypeError: BERTopic.init() got an unexpected keyword argument 'zeroshot_topic_list'

MaartenGr commented 1 month ago

my bertopic version is bertopicv0.16.2

Are you 100% sure that you are using v0.16.2? It is working for me in that version.