Package: PsychWordVec 2025.11

PsychWordVec: Word Embedding Research Framework for Psychological Science

An integrative toolbox of word embedding research that provides: (1) a collection of 'pre-trained' static word vectors in the '.RData' compressed format <https://psychbruce.github.io/WordVector_RData.pdf>; (2) a group of functions to process, analyze, and visualize word vectors; (3) a range of tests to examine conceptual associations, including the Word Embedding Association Test <doi:10.1126/science.aal4230> and the Relative Norm Distance <doi:10.1073/pnas.1720347115>, with permutation test of significance; and (4) a set of training methods to locally train (static) word vectors from text corpora, including 'Word2Vec' <doi:10.48550/arXiv.1301.3781>, 'GloVe' <doi:10.3115/v1/D14-1162>, and 'FastText' <doi:10.48550/arXiv.1607.04606>.

Authors:Han Wu Shuang Bao [aut, cre]

PsychWordVec_2025.11.tar.gz
PsychWordVec_2025.11.zip(r-4.7)PsychWordVec_2025.11.zip(r-4.6)PsychWordVec_2025.11.zip(r-4.5)
PsychWordVec_2025.11.tgz(r-4.6-any)PsychWordVec_2025.11.tgz(r-4.5-any)
PsychWordVec_2025.11.tar.gz(r-4.7-any)PsychWordVec_2025.11.tar.gz(r-4.6-any)
PsychWordVec_2025.11.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
PsychWordVec/json (API)
NEWS

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

Bug tracker:https://github.com/psychbruce/psychwordvec/issues

Pkgdown/docs site:https://psychbruce.github.io

Datasets:
  • demodata - Demo data (pre-trained using word2vec on Google News; 8000 vocab, 300 dims).

On CRAN:

Conda:

bertcosine-similarityfasttextglovegptlanguage-modelnatural-language-processingnlppretrained-modelspsychologysemantic-analysistext-analysistext-miningtsneword-embeddingsword-vectorsword2vec

4.70 score 25 stars 9 scripts 209 downloads 29 exports 173 dependencies

Last updated from:9276201d52. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK264
source / vignettesOK298
linux-release-x86_64OK257
macos-release-arm64OK170
macos-oldrel-arm64OK123
windows-develOK138
windows-releaseOK110
windows-oldrelOK158
wasm-releaseOK226

Exports:as_embedas_wordveccccos_distcos_simcosine_similaritydata_transformdata_wordvec_loaddata_wordvec_subsetdict_expanddict_reliabilityget_wordvecload_embedload_wordvecmost_similarnormalizeorth_procrustespair_similaritypatternplot_networkplot_similarityplot_wordvecplot_wordvec_tSNEsum_wordvectab_similaritytest_RNDtest_WEATtokenizetrain_wordvec

Dependencies:abindafexaskpassbackportsbase64encbayestestRbitbit64bootbroombroom.mixedbruceRbslibcachemcarcarDatacellrangercheckmateclicliprclustercodacodetoolscolorspacecorpcorcorrplotcowplotcpp11crayoncurldata.tabledatawizardDerivdigestdoBydplyreffectsizeemmeansestimabilityevaluatefarverfastmapfdrtoolfontawesomeforcatsforecastforeignFormulafracdifffsfurrrfuturegenericsggplot2ggrepelglassoglobalsglueGPArotationgridExtragtablegtoolshavenhighrHmischmshtmlTablehtmltoolshtmlwidgetshttrigraphinsightinteractionsisobandjpegjquerylibjsonlitejtoolsknitrlabelinglatticelavaanlifecyclelistenvlme4lmerTestlmtestlpSolvemagrittrMASSMatrixMatrixModelsmediationmemoisemgcvmicrobenchmarkmimeminqamnormtmodelrmvtnormnlmenloptrnnetnumDerivopensslpanderparallellyparameterspbapplypbivnormpbkrtestperformancepillarpkgconfigplyrpngprettyunitsprogresspsychpurrrqgraphquadprogquantregR.methodsS3R.ooR.utilsR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreadrreadxlreformulasrematchreshape2rglriorlangrmarkdownrpartrstudioapiRtsneS7sandwichsassscalesSparseMstringistringrsurvivalsystexregtibbletidyrtidyselecttimeDatetinytextzdburcautf8vctrsviridisLitevroomwithrwritexlxfunyamlzoo

Readme and manuals

Help Manual

Help pageTopics
Word vectors data class: 'wordvec' and 'embed'.as_embed as_wordvec pattern [.embed
Cosine similarity/distance between two vectors.cosine_similarity cos_dist cos_sim
Transform plain text of word vectors into 'wordvec' (data.table) or 'embed' (matrix), saved in a compressed ".RData" file.data_transform
Load word vectors data ('wordvec' or 'embed') from ".RData" file.data_wordvec_load load_embed load_wordvec
[S3 method] Extract a subset of word vectors data.data_wordvec_subset subset.embed subset.wordvec
Demo data (pre-trained using word2vec on Google News; 8000 vocab, 300 dims).demodata
Expand a dictionary from the most similar words.dict_expand
Reliability analysis and PCA of a dictionary.dict_reliability
Extract word vector(s).get_wordvec
Find the Top-N most similar words.most_similar
Normalize all word vectors to the unit length 1.normalize
Orthogonal Procrustes rotation for matrix alignment.orth_procrustes
Compute a matrix of cosine similarity/distance of word pairs.pair_similarity
Visualize a (partial correlation) network graph of words.plot_network
Visualize cosine similarity of word pairs.plot_similarity
Visualize word vectors.plot_wordvec
Visualize word vectors with dimensionality reduced using t-SNE.plot_wordvec_tSNE
Calculate the sum vector of multiple words.sum_wordvec
Tabulate cosine similarity/distance of word pairs.tab_similarity
Relative Norm Distance (RND) analysis.test_RND
Word Embedding Association Test (WEAT) and Single-Category WEAT.test_WEAT
Tokenize raw text for training word embeddings.tokenize
Train static word embeddings using the Word2Vec, GloVe, or FastText algorithm.train_wordvec