Pretty and opinionated topic model visualization in Python.
Project description
topicwizard
Pretty and opinionated topic model visualization in Python.
Features
- Name topics
- Investigate complex relations between topics, words and documents
- Highly interactive
- 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.6.tar.gz
(61.1 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.1.6.tar.gz
.
File metadata
- Download URL: topic_wizard-0.1.6.tar.gz
- Upload date:
- Size: 61.1 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 | ca484b22d7828d8257be808bd69c22bed28a7b27259fd7379c7f867aa3595915 |
|
MD5 | b0c10e0c615bc21acb14d3da8d6e7bdb |
|
BLAKE2b-256 | b2311d3def100b59f439f56fd5106257a3355d0daf874baa883e0b81aac1238c |
File details
Details for the file topic_wizard-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.1.6-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-1056-oem
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5df8784f89498f5a52216f71e9bfbd4579bd3827d9f5f5f2978e870412f70b90 |
|
MD5 | 1ff27d822f8228f89a00b87f180b6344 |
|
BLAKE2b-256 | e755f91bd040ef0a24d8fc819d34c2816c8dfc0f34bee4d8d3f837d4d38ae02e |