Description Usage Arguments Value Source References Examples
The calculations are done with the text2vec package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
text |
Character string. |
tokenizer |
Function, function to perform tokenization. Defaults to text2vec::space_tokenizer. |
dim |
Integer, number of dimension of the resulting word vectors. |
window |
Integer, skip length between words. Defaults to 5. |
min_count |
Integer, number of times a token should appear to be considered in the model. Defaults to 5. |
n_iter |
Integer, number of training iterations. Defaults to 10. |
x_max |
Integer, maximum number of co-occurrences to use in the weighting function. Defaults to 10. |
stopwords |
Character, a vector of stop words to exclude from training. |
convergence_tol |
Numeric, value determining the convergence criteria.
|
threads |
number of CPU threads to use. Defaults to 1. |
composition |
Character, Either "tibble", "matrix", or "data.frame" for the format out the resulting word vectors. |
verbose |
Logical, controls whether progress is reported as operations are executed. |
A tibble, data.frame or matrix containing the token in the first column and word vectors in the remaining columns.
https://nlp.stanford.edu/projects/glove/
Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global Vectors for Word Representation.
1 | glove(fairy_tales, x_max = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.