--- id: bertopic version: "0.17.4" license: MIT License Copyright (c) 2024, Maarten P. Grootendorst Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # bertopic — BERTopic performs topic Modeling with state-of-the-art transformer models. License: permissive · Maintenance: active · Downloads: 529.2K/mo ## What it is and what it does BERTopic is a topic modeling library that combines transformer-based embeddings with density-based clustering to discover and label topics in text collections. It uses sentence-transformers to encode documents into dense vectors, applies umap-learn for dimensionality reduction, and hdbscan for clustering, then generates interpretable topic descriptions using c-TF-IDF. The library supports multiple modeling variants including supervised, semi-supervised, hierarchical, dynamic, and multimodal approaches, making it flexible for different use cases from exploratory analysis to production systems. The package integrates with pandas, numpy, and plotly for data handling and visualization. It can work with custom embedding models and supports fine-tuning topic representations through pluggable representation strategies, including integration with LLMs for generating human-readable topic summaries. Installation is straightforward with optional extras for alternative embedding backends or vision capabilities. Use it for: - Discover latent topics in large document collections to understand content themes without manual labeling. - Track how topics evolve over time in streaming or time-series text data using dynamic topic modeling. - Build supervised or semi-supervised topic models when partial labels or guidance are available for training. - Generate automatic topic summaries and labels using LLM integration for business intelligence. - Cluster and organize multimodal data to find cross-modal semantic patterns. - Extract interpretable topics from domain-specific corpora with custom embedding models. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. BERTopic performs topic modeling on text documents using transformer embeddings and c-TF-IDF clustering to identify and label coherent topics with interpretable keywords. Yes. BERTopic is actively maintained, has low install friction, carries permissive MIT licensing, and no known vulnerabilities. It is well-suited for anyone needing interpretable topic discovery from text—from research prototyping to production systems. The dependency set is standard in data science workflows and adds no unusual risk. Start with it if you need flexible, modern topic modeling. ## Install pip install bertopic uv add bertopic poetry add bertopic ## Installing bertopic Before you install: Low friction install with a pure-Python wheel. Depends on 9 runtime packages including hdbscan, umap-learn, sentence-transformers, pandas, numpy, and plotly—all standard data science libraries. Maintenance is active with recent commits and 7784 repository stars. License in practice: MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike. Quickstart: pip install bertopic from bertopic import BERTopic docs = ["document one", "document two", "document three"] topic_model = BERTopic() topics, probs = topic_model.fit_transform(docs) print(topic_model.get_topic_info()) Requires Python 3.10 or later. First run downloads transformer models and may consume significant memory for large document collections. Verify before relying: - Whether the package supports GPU acceleration for large-scale topic modeling. - Performance characteristics and scalability limits for document collections of various sizes. - Memory footprint and computational cost compared to alternative topic modeling approaches. ## Package facts - License: MIT License Copyright (c) 2024, Maarten P. Grootendorst Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 529.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags topic modeling nlp, bert topic extraction, document clustering embeddings, text topic discovery, semantic document grouping, transformer-based topic analysis, interpretable topic labels, unsupervised text categorization, nlp, clustering, embeddings [View on SkillFed](https://skillfed.io/packages/bertopic) · [View on PyPI](https://pypi.org/project/bertopic/)