{"id":20114819,"url":"https://github.com/gatenlp/cluster-embeddings","last_synced_at":"2025-07-23T10:31:27.464Z","repository":{"id":145770848,"uuid":"102127728","full_name":"GateNLP/cluster-embeddings","owner":"GateNLP","description":"Simple script to create clusters from embeddings in word2vec format","archived":false,"fork":false,"pushed_at":"2017-10-18T10:30:25.000Z","size":6,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-06T13:45:32.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GateNLP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-01T15:37:19.000Z","updated_at":"2022-06-09T05:46:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe5c255c-47be-4c6c-86fd-2424bbebe2a2","html_url":"https://github.com/GateNLP/cluster-embeddings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GateNLP/cluster-embeddings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fcluster-embeddings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fcluster-embeddings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fcluster-embeddings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fcluster-embeddings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GateNLP","download_url":"https://codeload.github.com/GateNLP/cluster-embeddings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fcluster-embeddings/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266662000,"owners_count":23964416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:32:12.123Z","updated_at":"2025-07-23T10:31:27.442Z","avatar_url":"https://github.com/GateNLP.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tool for clustering embeddings\n\nSo far, just a simple script to run a bunch of sklearn clustering algorithms\non embeddings in word2vec format.\n\nSome results on usefulness:\n* usefulness for POS tagging: https://github.com/GateNLP/exp-lf-pos\n\n## Usage\n\nGet usage information by running:\n* `python3 ./python/cluster-embs.py -h`\n\nCurrently the following clustering algorithms are supported (using the sklearn back-end). For \nsome of the algorithms, information about the clusters is written to a file with extension `info.json`:\n* MiniBatchKMeans (default): k-means clustering using minibatch SGD\n  Info: `cluster_centers`, `inertia`, `counts`, `n_iter`\n* KMeans: k-means clustering\n  Info: `cluter_centers`, `inertia`, `n_iter`\n* AgglomerativeClusteringWard: agglomerative clustering using ward linkage\n* AgglomerativeClusteringAverageEuclidean: agglomerative clustering using average linkage \n* Birch\n* SpectralClustering: spectral clustering with rbf affinity \n\nFor MiniBatchKMeans and KMeans, the 20 elements most similar to each of the k cluster centroids \nare stored in a file with the extension `mostsimilar.json`.\n\n## Clustering times\n\n| embeddings | machine | alg | k | elapsed time, total | elapsed time, clustering | \n|------------|---------|-----|---|-------------|----|\n| fasttext wiki.en.vec | derwent | KMeans | 100 | 5:21:16 | ??? |\n| fasttext wiki.en.vec | derwent | MiniBatchKMeans | 100 |  0:16:37 | 0:00:38 |\n| fasttext wiki.en.vec | derwent | MiniBatchKMeans | 500 |  0:22:18 | 0:02:22 |\n| fasttext wiki.bg.vec | derwent | MiniBatchKMeans | 100 |  0:02:27 | 0:00:13 | \n| fasttext wiki.bg.vec | derwent | MiniBatchKMeans | 500 |  0:04:42 | 0:01:18 |  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgatenlp%2Fcluster-embeddings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgatenlp%2Fcluster-embeddings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgatenlp%2Fcluster-embeddings/lists"}