
Test whether there is a significant difference in meaning between two sets of texts (i.e., between their word embeddings).
textSimilarityTest(
x,
y,
Npermutations = 10000,
method = "paired",
alternative = c("two_sided", "less", "greater"),
output.permutations = TRUE,
N_cluster_nodes = 1,
seed = 1001
)
Set of word embeddings from textEmbed.
Set of word embeddings from textEmbed.
Number of permutations (default 1000).
Compute a "paired" or an "unpaired" test.
Use a two or one-sided test (select one of: "two_sided", "less", "greater").
If TRUE, returns permuted values in output.
Number of cluster nodes to use (more makes computation faster; see parallel package).
Set different seed.
A list with a p-value, cosine_estimate and permuted values if output.permutations=TRUE.
# NOT RUN {
x <- word_embeddings_4$harmonywords
y <- word_embeddings_4$satisfactionwords
textSimilarityTest(x,
y,
method = "paired",
Npermutations = 100,
N_cluster_nodes = 1,
alternative = "two_sided"
)
# }
Run the code above in your browser using DataLab