Compute 2 PCA dimensions of the word embeddings for individual words.

textPCA(words, single_word_embeddings = single_word_embeddings_df, seed = 1010)

Arguments

words

Word or text variable to be plotted.

single_word_embeddings

Word embeddings from textEmbed for individual words (i.e., decontextualized embeddings).

seed

Set different seed.

Value

A dataframe with words, their frquency and two PCA dimensions from the word_embeddings for the individual words that is used for the plotting in the textPCAPlot function.

See also

Examples

if (FALSE) {
# Data
df_for_plotting2d <- textPCA(
  words = Language_based_assessment_data_8$harmonywords,
  single_word_embeddings = word_embeddings_4$singlewords_we
)
df_for_plotting2d
}