Package: sentopics 1.0.0

sentopics: Tools for Joint Sentiment and Topic Analysis of Textual Data

A framework that joins topic modeling and sentiment analysis of textual data. The package implements a fast Gibbs sampling estimation of Latent Dirichlet Allocation (Griffiths and Steyvers (2004) <doi:10.1073/pnas.0307752101>) and Joint Sentiment/Topic Model (Lin, He, Everson and Ruger (2012) <doi:10.1109/TKDE.2011.48>). It offers a variety of helpers and visualizations to analyze the result of topic modeling. The framework also allows enriching topic models with dates and externally computed sentiment measures. A flexible aggregation scheme enables the creation of time series of sentiment or topical proportions from the enriched topic models. Moreover, a novel method jointly aggregates topic proportions and sentiment measures to derive time series of topical sentiment.

Authors:Olivier Delmarcelle [aut, cre], Samuel Borms [ctb], Chengua Lin [cph], Yulan He [cph], Jose Bernardo [cph], David Robinson [cph], Julia Silge [cph]

sentopics_1.0.0.tar.gz
sentopics_1.0.0.zip(r-4.7)sentopics_1.0.0.zip(r-4.6)sentopics_1.0.0.zip(r-4.5)
sentopics_1.0.0.tgz(r-4.6-x86_64)sentopics_1.0.0.tgz(r-4.6-arm64)sentopics_1.0.0.tgz(r-4.5-x86_64)sentopics_1.0.0.tgz(r-4.5-arm64)
sentopics_1.0.0.tar.gz(r-4.7-arm64)sentopics_1.0.0.tar.gz(r-4.7-x86_64)sentopics_1.0.0.tar.gz(r-4.6-arm64)sentopics_1.0.0.tar.gz(r-4.6-x86_64)
sentopics_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
sentopics/json (API)
NEWS

# Install 'sentopics' in R:
install.packages('sentopics', repos = c('https://odelmarcelle.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/odelmarcelle/sentopics/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

Conda:

openblascppopenmp

5.38 score 8 stars 5 scripts 243 downloads 38 exports 21 dependencies

Last updated from:3df259a7ca. Checks:11 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE311
linux-devel-x86_64NOTE345
source / vignettesOK328
linux-release-arm64NOTE314
linux-release-x86_64NOTE358
macos-release-arm64NOTE316
macos-release-x86_64NOTE598
macos-oldrel-arm64NOTE405
macos-oldrel-x86_64NOTE458
windows-develNOTE333
windows-releaseNOTE346
windows-oldrelNOTE324
wasm-releaseOK176

Exports:as.JSTas.LDAas.LDA_ldaas.rJSTas.sentopicsmodelas.tokenschains_distanceschains_scorescoherencecompute_PicaultRenault_scoresdocvarsfitfit.sentopicsmodelgrowJSTLDALDAvismeltmerge_topicsplot_proportion_topicsplot_sentiment_breakdownplot_sentiment_topicsplot_top_wordsproportion_topicsresetrJSTsentiment_breakdownsentiment_seriessentiment_topicssentopics_datesentopics_date<-sentopics_labelssentopics_labels<-sentopics_sentimentsentopics_sentiment<-sentopicsmodeltokenstop_words

Dependencies:clidata.tablefastmatchgenericsISOcodesjsonlitelatticelifecyclemagrittrMatrixquantedaRcppRcppArmadilloRcppHungarianRcppProgressrlangSnowballCstopwordsstringixml2yaml

Basic usage

Rendered fromBasic_usage.Rmdusingknitr::rmarkdownon May 13 2026.

Last update: 2025-07-29
Started: 2022-01-04

Topical time series

Rendered fromTopical_time_series.Rmdusingknitr::rmarkdownon May 13 2026.

Last update: 2025-10-14
Started: 2022-01-04

Readme and manuals

Help Manual

Help pageTopics
Tools for joining sentiment and topic analysis (sentopics)sentopics-package sentopics
Conversions from other packages to LDAas.LDA as.LDA.keyATM_output as.LDA.LDA_Gibbs as.LDA.LDA_VEM as.LDA.STM as.LDA.textmodel_lda as.LDA_lda
Convert back a dfm to a tokens objectas.tokens.dfm
Distances between topic models (chains)chains_distances
Compute scores of topic models (chains)chains_scores
Coherence of estimated topicscoherence
Compute scores using the Picault-Renault lexiconcompute_PicaultRenault_scores
Corpus of press conferences from the European Central BankECB_press_conferences
Tokenized press conferencesECB_press_conferences_tokens
Estimate a topic modelfit.JST fit.LDA fit.multi_chains fit.rJST fit.sentopicsmodel grow grow.JST grow.LDA grow.multi_chains grow.rJST grow.sentopicsmodel
Download press conferences from the European Central Bankget_ECB_press_conferences
Download and pre-process speeches from the European Central Bankget_ECB_speeches
Create a Joint Sentiment/Topic modelJST
Create a Latent Dirichlet Allocation modelLDA
Visualize an LDA model using 'LDAvis'LDAvis
Loughran-McDonald lexiconLoughranMcDonald
Replacement generic for 'data.table::melt()'melt
Melt for sentopicsmodelsmelt.sentopicsmodel
Merge topics into fewer themesmerge_topics
Picault-Renault lexiconPicaultRenault
Regression dataset based on Picault & Renault (2017)PicaultRenault_data
Plot the distances between topic models (chains)plot.multi_chains
Plot a topic model using Plotlyplot.sentopicsmodel
Print method for sentopics modelsprint.JST print.LDA print.rJST print.sentopicsmodel
Compute the topic or sentiment proportion time seriesplot_proportion_topics proportion_topics
Re-initialize a topic modelreset
Create a Reverse Joint Sentiment/Topic modelrJST rJST.default rJST.LDA
Breakdown the sentiment into topical componentsplot_sentiment_breakdown sentiment_breakdown
Compute a sentiment time seriessentiment_series
Compute time series of topical sentimentsplot_sentiment_topics sentiment_topics
Internal datesentopics_date sentopics_date<-
Setting topic or sentiment labelssentopics_labels sentopics_labels<-
Internal sentimentsentopics_sentiment sentopics_sentiment<-
Extract the most representative words from topicsplot_top_words top_words