Natural Language Processing

stm – structural topic modelling for text analysis

stm is a package for estimating Structural Topic Models, a statistical approach to discovering topics in collections of documents. It extends conventional topic modelling by incorporating document-level information into the estimation process.

This allows researchers to investigate not only which topics occur in a collection of texts, but also how their prevalence and content relate to characteristics such as publication date, document source, or other observed variables.

The package is particularly useful in computational social science, political communication, survey research, and other fields where textual data needs to be analysed alongside structured metadata.

This is free and open source software.

Key Features

  • Estimates Structural Topic Models using variational expectation-maximization algorithms.
  • Incorporates document-level covariates into models of topic prevalence and content.
  • Processes raw text into document-term representations suitable for topic modelling.
  • Accepts existing corpus and document-term matrix representations.
  • Estimates relationships between observed covariates and latent topics, including measures of uncertainty.
  • Supports model selection and comparison to help assess alternative topic structures.
  • Calculates topic correlations and estimates relationships between discovered topics.
  • Creates graphical representations of topic prevalence, estimated covariate effects, and topic relationships.
  • Provides tools for examining the words most strongly associated with particular topics.
  • Supports analysis of how topic prevalence differs across document groups or changes with continuous variables.
  • Includes functions for inspecting representative documents associated with discovered topics.
  • Provides statistical output suitable for further analysis and reporting.

Website: github.com/bstewart/stm
Support:
Developer: Margaret Roberts, Brandon Stewart, and Dustin Tingley
License: MIT License

stm is written in R. Learn R with our recommended free books and free tutorials.


Related Software

R Natural Language Processing Tools
tidytextText mining using dplyr, ggplot2, and other tidy tools
quantedaR package for Quantitative Analysis of Textual Data
text2vecFramework with API for text analysis and natural language processing
wordcloudCreate attractive word clouds
tmText Mining Infrastructure in R
srtringiFast and portable character string processing in R
StringrString manipulation in R
UDPipeTokenization, Tagging, Lemmatization and Dependency Parsing
tokenizersConvert natural language text into tokens
spacyrR wrapper around the Python spaCy package
Word VectorsBuild and explore embedding models
syuzhetExtraction of sentiment and sentiment-based plot arcs from text
textTinyRText processing for small or big data
sentimentrDictionary based sentiment analysis
textcleanCollection of tools to clean and normalize text
TALLExplore, model, and visualize textual data
corpustoolsVarious tools for analyzing text corpora
topicmodelsInterface to LDA and CTM models
textAnalyzing natural language with transformers-based large language models
RTextToolsAutomatic text classification via supervised learning

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted