{"id":21723523,"url":"https://github.com/till-tietz/gsdmm","last_synced_at":"2026-02-26T00:32:42.079Z","repository":{"id":183744244,"uuid":"670668331","full_name":"till-tietz/gsdmm","owner":"till-tietz","description":"GSDMM Short Text Clustering via Dirichlet Mixture Models","archived":false,"fork":false,"pushed_at":"2025-03-15T15:56:58.000Z","size":1346,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T16:27:19.258Z","etag":null,"topics":["cpp","r","rcpp","text-analytics","text-clustering"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/till-tietz.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-07-25T15:02:01.000Z","updated_at":"2025-03-15T15:57:02.000Z","dependencies_parsed_at":"2025-03-15T16:33:32.479Z","dependency_job_id":null,"html_url":"https://github.com/till-tietz/gsdmm","commit_stats":null,"previous_names":["till-tietz/gsdmm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/till-tietz%2Fgsdmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/till-tietz%2Fgsdmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/till-tietz%2Fgsdmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/till-tietz%2Fgsdmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/till-tietz","download_url":"https://codeload.github.com/till-tietz/gsdmm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244700650,"owners_count":20495578,"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","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":["cpp","r","rcpp","text-analytics","text-clustering"],"created_at":"2024-11-26T02:40:01.367Z","updated_at":"2026-02-26T00:32:37.048Z","avatar_url":"https://github.com/till-tietz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\npkgload::load_all()\n```\n\n# gsdmm\n\n\u003c!-- badges: start --\u003e\n[![gsdmm status badge](https://till-tietz.r-universe.dev/badges/gsdmm)](https://till-tietz.r-universe.dev/gsdmm)\n\u003c!-- badges: end --\u003e\n\n---\n\n`gsdmm` implements short text classification via Dirichlet Mixture Models proposed by [Yin and Wang 2014](https://www.semanticscholar.org/paper/A-dirichlet-multinomial-mixture-model-based-for-Yin-Wang/d03ca28403da15e75bc3e90c21eab44031257e80?p2df). It provides a fast `c++` implementation and R interface for the Gibbs sampler described in the paper. Specifically, `gsdmm` implements the Likelihood function allowing for multiple occurrences of the same word in a given text (EQ4).\n\n**Benefits:** \\\n\n- very space and time efficient\n- unlike LDA it requires only an upper bound on the number of clusters\n\n**Development:** \\\n\n- I am planning to add a tuning function for the alpha and beta parameters of the gibbs sampler\n\n## Installation\n\nYou can install the development version of gsdmm from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"till-tietz/gsdmm\")\n```\n\n## Usage\n\nHere is a minimal working example.\n\n```{r, message = FALSE, warning = FALSE}\n# we lemmatize and tokenize creating a list of character vector representing each text\ntext \u003c- c(\n  \"Rockets are amazing.\",\n  \"Witnessing a rocket in flight is a marvel of engineering.\",\n  \"We should take a rocket to Mars.\",\n  \"Rocket\",\n  \"Have you ever seen a cat?\",\n  \"Cats are fun.\",\n  \"Your cat seems sweet.\",\n  \"Cat\"\n) |\u003e\n  tolower() |\u003e\n  gsub(pattern = \"[[:punct:] ]+\", replacement = \" \") |\u003e\n  textstem::lemmatize_strings() |\u003e\n  text2vec::word_tokenizer() |\u003e\n  lapply(function(i) i[!i %in% stopwords::stopwords()])\n\nset.seed(42)\n\ngsdmm::gsdmm(texts = text, n_iter = 100, n_clust = 5, alpha = 0.1, beta = 0.01, progress = FALSE)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftill-tietz%2Fgsdmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftill-tietz%2Fgsdmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftill-tietz%2Fgsdmm/lists"}