Skip to main content

Pretty and opinionated topic model visualization in Python.

Project description

Logo with text

topicwizard: Pretty and opinionated topic model visualization

PyPI version pip downloads python version Code style: black

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

topics screenshot

b) Words

words screenshot words screenshot

c) Documents

documents screenshot

Project details


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.4.tar.gz (60.9 kB view details)

Uploaded Source

Built Distribution

topic_wizard-0.1.4-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

Details for the file topic_wizard-0.1.4.tar.gz.

File metadata

  • Download URL: topic_wizard-0.1.4.tar.gz
  • Upload date:
  • Size: 60.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.8 Linux/5.14.0-1055-oem

File hashes

Hashes for topic_wizard-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5a2210c80a91724f57f62dc74843a2551fb96a9158da2a7c1b9886cc3725f8d0
MD5 75a96ec813d84a89c5ab7b0cdf8295dd
BLAKE2b-256 f6a59819c20ed865b60e9b90062d1d90fd2179ba24820056df6b00b2801c0384

See more details on using hashes here.

File details

Details for the file topic_wizard-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: topic_wizard-0.1.4-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-1055-oem

File hashes

Hashes for topic_wizard-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 30a6493017fecf7e769342747f7b4101882d8d2c07dd314a4a251a7236a0e6da
MD5 c42971fc84e5cf04dfb29cb1d16db4e0
BLAKE2b-256 70f3bc65514d59b5ed46ce0e7dcf2aff9a7435ff37b69670a9e5720f26fde8f1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page