Skip to main content

SimpleTopicModel

Easily identifying themes in text

image

What is this?

This is a package that wraps up common theme identification (Topic Modeling) techniques in Python. SimpleTopicModel is currently under development, and subject to change.

How do I get it?

Currently, you can git clone this repo and import it locally. Be sure to run pip install -r requirements.txt in the repo folder, to ensure you've got the relevant requirements.

I'm working on setting up a pypi release, slated for the near future.

How do I use it?

image Use couldn't be easier. Most topic modeling techniques follow the same paradigm:

  1. Convert your text to numbers (embeddings): The excellent Sentence-Transformers package does this for us, using Microsoft's Mini-LM model.
  2. Reduce Dimensionality: This package uses UMAP, but you could substitute TSNE or PCA if you wanted to.
  3. Cluster: We're using HDBSCAN to build hierarchial clusters (which we'd like to traverse in a later release), but you could also use a KNN, GMM, etc.
  4. Visualize (Optional): This displays the reduced dimension embeddings in 3d (or 2d) space, so you can get a feel for how "tight" the clusters are.

What's next?

  • Clean up/professionalize this repo & releases
  • Add automated cluster naming techniques (cTF-IDF, LLM-assisted naming, etc)
  • Make a sweet logo & eyecatching graphics
  • Fix the docs page

Acknowledgements:

This builds on previous work including Gensim (LDA), BERTopic, Top2Vec, and pyLDAvis. They're all excellent, more mature alternatives to SimpleTopicModel, and I'd encourage you to go check them out!

Metadata

Release files for SimpleTopicModel 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SimpleTopicModel 0.0.8
File Size Uploaded
SimpleTopicModel-0.0.8.tar.gz 17.0 kB Details

Release files / SimpleTopicModel-0.0.8.tar.gz

Download URL SimpleTopicModel-0.0.8.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5ce0858691453eb1fd753f547a9c51734a1c90cde7be60c6feae0454d150a586
BLAKE2b-256 checksum
How to use checksums
e837cffcc304168b6b5d237caa6686ce170b06aad6769e02501994387e4994fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page