Pretty and opinionated topic model visualization in Python.
Project description
topicwizard
Pretty and opinionated topic model visualization in Python.
Features
- Investigate complex relations between topics, words and documents
- Highly interactive
- Name topics
- Pretty :art:
- Intuitive :cow:
- Clean API :candy:
- Sklearn compatible :nut_and_bolt:
- Easy deployment :earth_africa:
Installation
Install from PyPI:
pip install topic-wizard
Usage (documentation)
Step 1:
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)
Step 2:
Visualize with topicwizard.
import topicwizard
topicwizard.visualize(pipeline=topic_pipeline, corpus=texts)
Step 3:
Investigate :eyes: .
a) Topics
b) Words
c) Documents
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
topic_wizard-0.2.4.tar.gz
(64.0 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.2.4.tar.gz
.
File metadata
- Download URL: topic_wizard-0.2.4.tar.gz
- Upload date:
- Size: 64.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.19.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a9c32c120dc2640f36bf77819c6ace6d93fd7080c585db7113f9aeccaccf34a |
|
MD5 | dd585c1820e3c8d1c30fee12a491a212 |
|
BLAKE2b-256 | eaf49e05a847c8d4c9d701a9b7924759f6701f42e0af059b88690c5054cae23d |
File details
Details for the file topic_wizard-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.2.4-py3-none-any.whl
- Upload date:
- Size: 77.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.19.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1f548e75a4948c21b4024e020427536422ff3e7ff00996b2f8a7c0d422bf6c2 |
|
MD5 | e016c19b9fea5eda7568d161eb4bcce4 |
|
BLAKE2b-256 | 10a163a30420d2fcb15cc6b43eba6eb42db514d88ae09c8d4ea0c6b40b1d7ed9 |