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.3.tar.gz
(60.9 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.1.3.tar.gz
.
File metadata
- Download URL: topic_wizard-0.1.3.tar.gz
- Upload date:
- Size: 60.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 | 0e6ae346b0b768b8456270614449925263663ed13dd5ac1e22bc28fab46ed909 |
|
MD5 | afbb8301e3abaa999577f4e574a26d44 |
|
BLAKE2b-256 | d94d6fca43108068a456bec8062510281f4ba6f0fbbae55f16c3d9973d9b0a02 |
File details
Details for the file topic_wizard-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.1.3-py3-none-any.whl
- Upload date:
- Size: 73.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 | 940c145b5e825d59cb8f0b5150f46c37748c0145590d6ecc283f1df9c1a45a92 |
|
MD5 | fae019d213cae9c1a48b11079183428d |
|
BLAKE2b-256 | 21181201fdf2acc27a6ff1e23534e314be69bad1480231dce78d8f69036721d8 |