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

Uploaded Source

Built Distribution

topic_wizard-0.1.2-py3-none-any.whl (73.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topic_wizard-0.1.2.tar.gz
  • Upload date:
  • Size: 60.5 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.2.tar.gz
Algorithm Hash digest
SHA256 28075df5153389a6e0e4512e58632245173f7ab89d00dfa7248b3c733cb8c306
MD5 e5ee29e687e61b251746d9a65e4cb038
BLAKE2b-256 24f9f971f14045d00760e802ae07095e40bc6e4d6a3c91937c5228c0b56805d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: topic_wizard-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 73.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3799a7b07bebc81665d368ed7ca12c9c2ff7573c42077b0dbb3d1a2d89aea85
MD5 cf316fad988dda1b79b8d3e1c3dc18b9
BLAKE2b-256 64950cd33967461ade817c34e53aed4b4b276f5ef823e82a8558c74df807bea9

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