Skip to main content

Super Simple Topic Clustering

Project description

Super Simple Topic Clustering

Super Simple Topic Clustering is as the name suggests, feed it an array of sentences and it will cluster them with human-readable names.

Quick Start

pip install labelled-topic-clustering
from labelled_topic_clustering import TopicClusterer

HF_TOKEN = '...'
MODEL_ID="sentence-transformers/all-mpnet-base-v2"

sentences = ["the weather is good", "my dog ate my homework"]

clusterer = TopicClusterer(
    HF_TOKEN, MODEL_ID,
    debug=True,
    model_cache_dir="an/absolute/path/that/is/a/good/place/to/store/large/files"
)

clusters = clusterer.get_clusters(sentences, 0.5, 2)

clusters_labelled = clusterer.get_labels_from_clusters(clusters, sentences)

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

labelled-topic-clustering-1.0.15.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

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