-
Notifications
You must be signed in to change notification settings - Fork 882
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Have you searched existing issues? 🔎
- I have searched and found no existing issues
Desribe the bug
topic_model.find_topics(topic) crashes if topic is a list with 1 string only.
It works if topic is a string or a list of strings with len>1
Reproduction
from bertopic import BERTopic
from sklearn.datasets import fetch_20newsgroups
docs = fetch_20newsgroups(subset='all', remove=('headers', 'footers', 'quotes'))['data']
topic_model = BERTopic()
topics, probs = topic_model.fit_transform(docs)
similar_topics, similarities = topic_model.find_topics(["internet"], top_n=50)BERTopic Version
0.17.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working