Pretty and opinionated topic model visualization in Python.
Project description
topicwizard: Pretty and opinionated topic model visualization
Features
- 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.1.1.tar.gz
(59.9 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.1.1.tar.gz
.
File metadata
- Download URL: topic_wizard-0.1.1.tar.gz
- Upload date:
- Size: 59.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.8 Linux/5.14.0-1055-oem
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60a7b9718620ecc99aa0ff6b5a812075b260c5c447777c07394b6da2daeac9cd |
|
MD5 | ead1e376d3fd8b3f4d98845a8b9c856f |
|
BLAKE2b-256 | 23ade250595815b41ddbd751cfd5de1f1475331bf8199691c9b1e662849ae7fa |
File details
Details for the file topic_wizard-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.1.1-py3-none-any.whl
- Upload date:
- Size: 72.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.8 Linux/5.14.0-1055-oem
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f1ab97a5c8dfbebf10338ac8c9802ca70bd33abbf0208747dab6a8e65b23a48 |
|
MD5 | 3969612872a50c9141bf8591e5a2d689 |
|
BLAKE2b-256 | c172d8ecf9ea631691fca454cc7e7feda38828735e25c2c2c71fa15f6f3b4057 |