Skip to content

koheiw/seededlda

Repository files navigation

seededlda: the package for semi-supervised topic modeling

CRAN Version Downloads Total Downloads R build status codecov

seededlda is an R package that implements Seeded LDA (Latent Dirichlet Allocation) for semi-supervised topic modeling based on quanteda. Initially, the package was a simple wrapper around the topicmodels package, but it was fully rewritten in C++ using the GibbsLDA++ library and submitted to CRAN as version 0.5 in 2020. The package was further developed to add the sequential classification (Sequential LDA) and parallel computing (Distributed LDA) capabilities and released as version 1.0 in 2023.

keyATM is the latest addition to the semi-supervised topic models. The users of Seeded LDA are also encouraged to download that package.

Installation

From CRAN:

install.packages("seededlda")

From Github:

devtools::install_github("koheiw/seededlda")

Examples

Please visit the package website for examples:

Please read the following papers on the algorithms.

  • Watanabe, K., & Baturo, A. (2023). Seeded Sequential LDA: A Semi-Supervised Algorithm for Topic-Specific Analysis of Sentences. Social Science Computer Review. https://doi.org/10.1177/08944393231178605
  • Watanabe, K. (2023). Speed Up Topic Modeling: Distributed Computing and Convergence Detection for LDA, working paper.

Other publications

Please read the following papers for how to apply seeded-LDA in social science research:

  • Curini, L., & Vignoli, V. (2021). Committed Moderates and Uncommitted Extremists: Ideological Leaning and Parties’ Narratives on Military Interventions in Italy. Foreign Policy Analysis, 17(3), 1–20. https://doi.org/10.1093/fpa/orab016

Releases

No releases published

Packages

No packages published