textDimName: Change the names of the dimensions in the word embeddings.

View source: R/1_1_textEmbed.R

textDimNameR Documentation

Change the names of the dimensions in the word embeddings.

Description

Change the names of the dimensions in the word embeddings.

Usage

textDimName(word_embeddings, dim_names = TRUE)

Arguments

word_embeddings

List of word embeddings

dim_names

(boolean) If TRUE the word embedding name will be attached to the name of each dimension; is FALSE, the attached part of the name will be removed.

Value

Word embeddings with changed names.

See Also

see textEmbed

Examples


# Note that dimensions are called Dim1_harmonytexts etc.
word_embeddings_4$texts$harmonytexts
# Here they are changed to just Dim
w_e_T <- textDimName(word_embeddings_4$texts["harmonytexts"],
  dim_names = FALSE
)
# Here they are changed back
w_e_F <- textDimName(w_e_T, dim_names = TRUE)


text documentation built on Aug. 9, 2023, 5:08 p.m.