Skip to main content

Pretty and opinionated topic model visualization in Python.

Project description

topicwizard


Pretty and opinionated topic model visualization in Python.

Open in Colab PyPI version pip downloads python version Code style: black

Features

  • Name topics
  • Investigate complex relations between topics, words and documents
  • Highly interactive
  • 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.8.tar.gz (61.2 kB view details)

Uploaded Source

Built Distribution

topic_wizard-0.1.8-py3-none-any.whl (74.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topic_wizard-0.1.8.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

Hashes for topic_wizard-0.1.8.tar.gz
Algorithm Hash digest
SHA256 dbe0a55c75d3b4294b6d3dd36f56546dbf3ef997f58b2acd6589ef014af43c39
MD5 1e30f00a24f6fd30004e01ac9ee4b639
BLAKE2b-256 eba1adaddc5daf90add181a1b3e5443f440ea9e05c1210132309fd05d5161361

See more details on using hashes here.

File details

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

File metadata

  • Download URL: topic_wizard-0.1.8-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

Hashes for topic_wizard-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f671e913963b2539743f98f08f6aecfcfeab80e1f9a92e66157ca8c052b1d515
MD5 87f4ca7be052fe159343aa564a32c5aa
BLAKE2b-256 d24883df9a264f53f9c2c5c7e7b17107162450ca5a8132196464b8c241da0c3c

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