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.5.tar.gz
(60.7 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.1.5.tar.gz
.
File metadata
- Download URL: topic_wizard-0.1.5.tar.gz
- Upload date:
- Size: 60.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.8 Linux/5.14.0-1056-oem
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fec5db011d551ebe9a0e799287912210fe68343ae42be8858f98e96bb24119c4 |
|
MD5 | 5a3ea3bb7af1ac7ddcd830ca34a6a3b1 |
|
BLAKE2b-256 | 54c583e8e7eedf805e33cf5041aa058e14bf9a80a5e7e918dbc0f6c701baae0d |
File details
Details for the file topic_wizard-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.1.5-py3-none-any.whl
- Upload date:
- Size: 73.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.8 Linux/5.14.0-1056-oem
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f99e97505d93849cdfaba9a2f51466c42e6af8889a207fa3fadf299d3b695ef |
|
MD5 | 346592dcba029ea94a96078747f9d882 |
|
BLAKE2b-256 | 1b3d1ddc2ba5f8d9882ad1776c7c288f5cb31af7aa32388520222a96fd019acc |