Description Usage Arguments Value Examples
View source: R/similar_texts.R
Use to return semantically similar texts from one or severeal user-defined texts.
1 2 3 | similar_texts(texts, texts_id, strings, num_texts, Term_count_min,
Skip_gram_window, Word_vectors_size, X_max, N_iter,
xprt_txt_vctrs = TRUE)
|
texts |
The texts given by the user to classify later. |
strings |
A vector of strings to be feed into the model. |
num_texts |
The number of texts to be returned for each user-given string. |
Term_count_min |
GloVe parameter. |
Skip_gram_window |
GloVe parameter. |
Word_vectors_size |
GloVe parameter. |
X_max |
GloVe parameter. |
N_iter |
GloVe parameter. |
xprt_txt_vctrs |
Defaults to TRUE. Returns a list with the text vectors computed by the GloVe model to be reused again to feed for more strings. |
texts_ids |
The text_ids in the text to output nice clean format. |
A list with dataframes of similiar texts for each string. If text_vectors
== TRUE,
an additional list is added to the end of list containing the text vectors of the model to
used by similar_texts_lite()
function.
1 2 3 4 5 6 7 8 9 10 11 | similar_texts(texts = df$text,
texts_id = df$text_id,
strings = mystrgs,
num_texts = 5,
Term_count_min = 5,
Skip_gram_window = 10,
Word_vectors_size = 100,
X_max = 10,
N_iter = 8,
xprt_txt_vctrs = TRUE
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.