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.12.tar.gz
(61.2 kB
view details)
Built Distribution
File details
Details for the file topic_wizard-0.1.12.tar.gz
.
File metadata
- Download URL: topic_wizard-0.1.12.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 | f60b02651db57c1db64e2947b1043b1b42eab14f91e7cba4d9a313b9f26ec109 |
|
MD5 | c2db86728774c596c6acafa375d0bbe5 |
|
BLAKE2b-256 | ec878b4c1bb4f1d2313d7d4f08fb64dc1116785c15a9282030791995e9882866 |
File details
Details for the file topic_wizard-0.1.12-py3-none-any.whl
.
File metadata
- Download URL: topic_wizard-0.1.12-py3-none-any.whl
- Upload date:
- Size: 74.0 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 | 8fa4f063aba070b47d1d554b474379941bc9fcd85a5f4172907ededc174b9a4b |
|
MD5 | 3c69c19410b65192da4913ae86f07eb9 |
|
BLAKE2b-256 | c7b169c3721f1d4cead27ffde02269ee31eb569572927a04e52235e5622b9346 |