Skip to content

Instantly share code, notes, and snippets.

@MaartenGr
Created January 5, 2021 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaartenGr/8a603815ad93237a78179b50e6b24ba7 to your computer and use it in GitHub Desktop.
Save MaartenGr/8a603815ad93237a78179b50e6b24ba7 to your computer and use it in GitHub Desktop.
from bertopic import BERTopic
model = BERTopic()
topics, probs = model.fit_transform(docs)
# Further reduce topics
new_topics, new_probs = model.reduce_topics(docs, topics, probs, nr_topics=30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment