Pretty and opinionated topic model visualization in Python.
topicwizard-2023-02-19_19.25.33.mp4
- Investigate complex relations between topics, words and documents
- Highly interactive
- Name topics
- Pretty 🎨
- Intuitive 🐮
- Clean API 🍬
- Sklearn compatible 🔩
- Easy deployment 🌍
Install from PyPI:
pip install topic-wizard
Usage (documentation)
Train a scikit-learn compatible topic model.
from sklearn.decomposition import NMF
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.pipeline import Pipeline
topic_pipeline = Pipeline(
[
("bow", CountVectorizer()),
("nmf", NMF(n_components=10)),
]
)
topic_pipeline.fit(texts)
Visualize with topicwizard.
import topicwizard
topicwizard.visualize(pipeline=topic_pipeline, corpus=texts)
Investigate 👀 .