Description Usage Arguments Value See Also Examples
Embed words in string to vectors using the pre-trained word2vec dictionary. User can also replace the word2vec dataframe with customized data.
1 | wordEmbed(object, dictionary, meanVec)
|
object |
Vectors of text representing documents. |
dictionary |
Dataframe of pre-trained word2vec dataset. The First column is the word and the following columns are numeric vectors from word2vec models. The default dataset with the package is a pre-trained 20 dimension word2vec dataset. |
meanVec |
Boolean variable. If meanVec is TRUE, a matrix is returned with each row representing the mean of numeric vectors of all the words in a document. If FALSE, a list of matrix is returned in which each document is represented by a matrix. |
wordEmbed returns a matrix if meanVec is TRUE and a list of matrix if meanVec is FALSE.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.