Mainly a visualization update to improve understanding of the topic model.
Features
- Additional visualizations:
- Topic Hierarchy:
topic_model.visualize_hierarchy() - Topic Similarity Heatmap:
topic_model.visualize_heatmap() - Topic Representation Barchart:
topic_model.visualize_barchart() - Term Score Decline:
topic_model.visualize_term_rank()
- Topic Hierarchy:
Improvements
- Created
bertopic.plottinglibrary to easily extend visualizations - Improved automatic topic reduction by using HDBSCAN to detect similar topics
- Sort topic ids by their frequency. -1 is the outlier class and contains typically the most documents. After that 0 is the largest topic, 1 the second largest, etc.
- Update MKDOCS with new visualizations
Fixes
- Fix typo #113, #117
- Fix #121 by removing the following two lines:
BERTopic/bertopic/_bertopic.py
Lines 359 to 360 in 5c6cf22
- Fix mapping of topics after reduction (it now excludes 0) (#103)