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.1.9.tar.gz
(61.2 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.1.9.tar.gz
.
File metadata
- Download URL: topic_wizard-0.1.9.tar.gz
- Upload date:
- Size: 61.2 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 | 5a55136ab92ea6f1ff61c64287c43a2e70dd7234ef0743beb93945cb89c771d8 |
|
MD5 | 2dee8bfc4c6bf987075afbcfb9297c98 |
|
BLAKE2b-256 | c8886ead2c81215aae9e39710da650a9dc9affd50071ee12650631c322884ce6 |
File details
Details for the file topic_wizard-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.1.9-py3-none-any.whl
- Upload date:
- Size: 74.1 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 | aa293dfd61e806f516edb7cea32995522642952ac01fe72349ab96d93738f1f1 |
|
MD5 | a1b1bd7a102b89cd464fb9a16c7dabc8 |
|
BLAKE2b-256 | 24b3d580e910dcfa74a82045490ab85557554894e4977728bfe0fa9c86bb30f4 |