Package: ssdiff 0.1.0

Paweł Lenartowicz

ssdiff: Supervised Semantic Differential

Interpretable, embedding-based analysis of concept meaning in text. Builds per-document concept vectors from local contexts around seed words, learns a semantic gradient that predicts a numeric outcome or separates groups, and interprets it through the nearest neighbours of each pole, clusters of those neighbours, text snippets and per-document scores. The method is described in Plisiecki, Lenartowicz, Pokropek, Małyska and Flakus (2025) <doi:10.31234/osf.io/gvrsb_v1>. A port of the 'Python' package 'ssdiff'.

Authors:Paweł Lenartowicz [aut, cre], Hubert Plisiecki [aut], Jason Miller [ctb, cph], Google Inc. [cph]

ssdiff_0.1.0.tar.gz
ssdiff_0.1.0.zip(r-4.7-any)ssdiff_0.1.0.zip(r-4.6-any)ssdiff_0.1.0.zip(r-4.5-any)
ssdiff_0.1.0.tgz(r-4.6-any)ssdiff_0.1.0.tgz(r-4.5-any)
ssdiff_0.1.0.tar.gz(r-4.7-any)ssdiff_0.1.0.tar.gz(r-4.6-any)
ssdiff_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
ssdiff/json (API)

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

Bug tracker:https://github.com/pawlenartowicz/ssdiff-r/issues

On CRAN:

Conda:

1.70 score 32 exports 4 dependencies

Last updated from:a6ba4c2eb9. Checks:7 OK, 2 ERROR. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK130
source / vignettesOK177
linux-releaseOK173
macos-releaseERROR129
macos-oldrelERROR128
windows-develOK113
windows-releaseOK154
windows-oldrelOK132
wasm-releaseOK90

Exports:cluster_snippetscluster_wordsclusterscontrastdoc_textdocsevaluate_lexiconfit_groupsfit_multiplsfit_plsfit_regressioninstall_backendslexicon_tokensload_wordpackoutcomespage_dataplot_sweepranefsave_pageset_abttsnippetsssdsuggest_lexiconsweep_tablewith_lexiconwordpack_cachewordpack_lookupwordpack_openwordpack_read_rowswordpack_selftestwordpack_tokenizewords

Dependencies:jsonlitelatticenlmeutf8

Readme and manuals

Help Manual

Help pageTopics
Words, clusters and snippets of a resultaccessors clusters cluster_snippets cluster_words snippets words
The difference of two gradientscontrast
Documents of a resultdocs doc_text
Evaluate a lexiconevaluate_lexicon
Compare groups of documentsfit_groups
Fit PLS gradients for several outcomesfit_multipls
Fit a PLS gradientfit_pls
Regress an outcome on texts, with covariatesfit_regression
Install the plskit and fastglmm backendsinstall_backends
Tokens of a lexicon suggestionlexicon_tokens
Load a wordpackload_wordpack
Outcome loadings of a multi-outcome fitoutcomes
The results pagepage_data save_page
Predict the outcome of new textspredict.ssd_pca_ols predict.ssd_pls predict.ssd_result
Print a textprint.ssd
Print loaded embeddingsprint.ssd_embeddings
Print a lexicon suggestionprint.ssd_lexicon
Print and summarise a resultprint.ssd_contrast print.ssd_groups print.ssd_multipls print.ssd_pca_ols print.ssd_pls print.ssd_snippets result-print summary.ssd_contrast summary.ssd_groups summary.ssd_multipls summary.ssd_pca_ols summary.ssd_pls
Print a wordpackprint.wordpack
Model generics of a regression resultcoef.ssd_pca_ols confint.ssd_pca_ols df.residual.ssd_pca_ols fitted.ssd_pca_ols logLik.ssd_pca_ols nobs.ssd_pca_ols ranef.ssd_pca_ols regression-generics residuals.ssd_pca_ols vcov.ssd_pca_ols
Set the ABTT of loaded embeddingsset_abtt
Build a text for SSD analysisssd
Suggest lexicon wordssuggest_lexicon
The K sweep of a regressionplot_sweep sweep_table
Give a text another lexiconwith_lexicon
The wordpack cachewordpack_cache
Rows of exact keyswordpack_lookup
Open a .wordpack filewordpack_open
Read embedding rowswordpack_read_rows
Run the pack's self-testwordpack_selftest
Tokenize texts with a wordpackwordpack_tokenize