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

Uploaded Source

Built Distribution

topic_wizard-0.2.1-py3-none-any.whl (74.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topic_wizard-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 25058bb6b2d9bee2f931205d9f82cbb5ad0b18a8c43496654e549da509741d5d
MD5 7995b9be8968bb44462884d404079392
BLAKE2b-256 fd7ab53725802e664aa3264a9858b2ac4a96ecb2c08077ac282fc74985e0de9f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for topic_wizard-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e95c324d9c1148c282c5945a9b8bc1473543829093b9c27db4bd026e4880aea5
MD5 1ebac6d7ea09edb2916395d6634c2e93
BLAKE2b-256 f375ba931f6d4550499c0fe85516da04eaad5b6ce6820d6944a8b534774f4b70

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