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

  • 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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for topic_wizard-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a3b2e4e1c94a52c5e63d90accb339f255d3ff3753e79ebf21697d4aaac95216b
MD5 0b40e370b8ca74a8f8752034a7cf0a0d
BLAKE2b-256 4de2f980445486f0a206fc960ff7c82f52c011c8b81e57381b5222972e7e3f70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: topic_wizard-0.2.0-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-1057-oem

File hashes

Hashes for topic_wizard-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49d86e1c31ad28b90ac4a2ef0bd32d76f571859f93371a09989c30566c19b4f4
MD5 34349ba5be2ab5046078878716c3b2ff
BLAKE2b-256 a98f290e1d57cb31f1cfc82bb0f184283961c014596b040d69746610af655988

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