Package: sentopics 0.7.3

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_0.7.3.tar.gz
sentopics_0.7.3.zip(r-4.5)sentopics_0.7.3.zip(r-4.4)sentopics_0.7.3.zip(r-4.3)
sentopics_0.7.3.tgz(r-4.4-x86_64)sentopics_0.7.3.tgz(r-4.4-arm64)sentopics_0.7.3.tgz(r-4.3-x86_64)sentopics_0.7.3.tgz(r-4.3-arm64)
sentopics_0.7.3.tar.gz(r-4.5-noble)sentopics_0.7.3.tar.gz(r-4.4-noble)
sentopics_0.7.3.tgz(r-4.4-emscripten)sentopics_0.7.3.tgz(r-4.3-emscripten)
sentopics.pdf |sentopics.html
sentopics/json (API)
NEWS

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

Peer review:

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:

5.15 score 7 stars 5 scripts 274 downloads 38 exports 22 dependencies

Last updated 2 months agofrom:54841e61e9. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 04 2024
R-4.5-win-x86_64NOTENov 04 2024
R-4.5-linux-x86_64NOTENov 04 2024
R-4.4-win-x86_64NOTENov 04 2024
R-4.4-mac-x86_64NOTENov 04 2024
R-4.4-mac-aarch64NOTENov 04 2024
R-4.3-win-x86_64NOTENov 04 2024
R-4.3-mac-x86_64NOTENov 04 2024
R-4.3-mac-aarch64NOTENov 04 2024

Exports:as.JSTas.LDAas.LDA_ldaas.rJSTas.sentopicmodelas.tokenschainsDistanceschainsScorescoherencecompute_PicaultRenault_scoresdocvarsfitfit.sentopicmodelgrowJSTLDALDAvismeltmergeTopicsplot_proportion_topicsplot_sentiment_breakdownplot_sentiment_topicsplot_topWordsproportion_topicsresetrJSTsentiment_breakdownsentiment_seriessentiment_topicssentopicmodelsentopics_datesentopics_date<-sentopics_labelssentopics_labels<-sentopics_sentimentsentopics_sentiment<-tokenstopWords

Dependencies:clidata.tablefastmatchgenericsglueISOcodesjsonlitelatticelifecyclemagrittrMatrixquantedaRcppRcppArmadilloRcppHungarianRcppProgressrlangSnowballCstopwordsstringixml2yaml

Basic usage

Rendered fromBasic_usage.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2024-04-17
Started: 2022-01-04

Topical time series

Rendered fromTopical_time_series.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2023-08-02
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)chainsDistances
Compute scores of topic models (chains)chainsScores
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.multiChains fit.rJST fit.sentopicmodel grow grow.JST grow.LDA grow.multiChains grow.rJST grow.sentopicmodel
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 a LDA model using 'LDAvis'LDAvis
Loughran-McDonald lexiconLoughranMcDonald
Replacement generic for 'data.table::melt()'melt
Melt for sentopicmodelsmelt.sentopicmodel
Merge topics into fewer themesmergeTopics
Picault-Renault lexiconPicaultRenault
Regression dataset based on Picault & Renault (2017)PicaultRenault_data
Plot the distances between topic models (chains)plot.multiChains
Plot a topic model using Plotlyplot.sentopicmodel
Print method for sentopics modelsprint.JST print.LDA print.rJST print.sentopicmodel
Compute the topic or sentiment proportion time seriesplot_proportion_topics proportion_topics
Re-initialize a topic modelreset
Create a Reversed 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_topWords topWords