# Computes the semantic similarity between the individual word embeddings (Iwe)
# in the "harmonywords" column of the pre-installed dataset: Language_based_assessment_data_8,
# and the aggregated word embedding (Awe).
# The Awe can be interpreted the latent meaning of the text.
if (FALSE) {
df_for_plotting <- textCentrality(
words = Language_based_assessment_data_8["harmonywords"],
word_embeddings = word_embeddings_4$texts$harmonywords,
word_types_embeddings = word_embeddings_4$word_types
)
# df_for_plotting contain variables (e.g., semantic similarity, frequencies) for
# the individual words that are used for plotting by the textCentralityPlot function.
}
Run the code above in your browser using DataLab