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.3.tar.gz
(61.9 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.2.3.tar.gz
.
File metadata
- Download URL: topic_wizard-0.2.3.tar.gz
- Upload date:
- Size: 61.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.8 Linux/5.15.0-69-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a7ee3f802cd853102305656ab1f6e9ec57953e42915fb5328afda9f7e45738d |
|
MD5 | 98ff72539591b109e4fece337f58258a |
|
BLAKE2b-256 | 29a8b33ef5267c5e8aeb7317bf247f58a1dc44ca2f575360ab0669ffe8202abc |
File details
Details for the file topic_wizard-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.2.3-py3-none-any.whl
- Upload date:
- Size: 74.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.8 Linux/5.15.0-69-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f492f0b298cf92b7cc7f6b1b44c9154f94a44b037302d630177d39ecc56e7a65 |
|
MD5 | 998549fc37d9208a0aa208b4e0af7b23 |
|
BLAKE2b-256 | bb22c05adc0bcb7141db3bf6e64b0d7213b05238c7137c992c8d9116b0b02cd8 |