Open
Description
Have you searched existing issues? 🔎
- I have searched and found no existing issues
Desribe the bug
I predefined the zero shot topic list, but the ordering of the topics is not the same as the list i provided:
zeroshot_topic_list = [
'Technology & Science',
'Arts Culture',
'Business',
'International',
'Geo Politics',
'Health & Wellness',
'Sports',
'Opinion & Editorial',
'Education',
'Environment',
]
topic_model = BERTopic(
language='english',
embedding_model="thenlper/gte-large",
min_topic_size=15,
zeroshot_topic_list=zeroshot_topic_list,
zeroshot_min_similarity=0,
calculate_probabilities=True,
representation_model=KeyBERTInspired()
)
topics, props = topic_model.fit_transform(docs)

Reproduction
from bertopic import BERTopic
zeroshot_topic_list = [
'Technology & Science',
'Arts Culture',
'Business',
'International',
'Geo Politics',
'Health & Wellness',
'Sports',
'Opinion & Editorial',
'Education',
'Environment',
]
topic_model = BERTopic(
language='english',
embedding_model="thenlper/gte-large",
min_topic_size=15,
zeroshot_topic_list=zeroshot_topic_list,
zeroshot_min_similarity=0,
calculate_probabilities=False,
representation_model=KeyBERTInspired()
)
topics, props = topic_model.fit_transform(docs)
BERTopic Version
0.17.0