Description Usage Arguments Value See Also Examples
Train Word2Vec model.
1 2 3 4 |
train |
Use text data from file to train the model. |
output |
Use file to save the resulting word vectors / word clusters. |
size |
Set size of word vectors; default is |
window |
Set max skip length between words; default is |
sample |
Set threshold for occurrence of words.
Those that appear with higher frequency in the training data will be randomly
down-sampled; default is |
hs |
Use Hierarchical Softmax; default is |
negative |
Number of negative examples; default is |
threads |
Use n threads (default |
iter |
Run more training iterations (default |
min_count |
This will discard words that appear less than n times;
default is |
alpha |
Set the starting learning rate; default is |
debug |
Set the debug mode (default = |
binary |
Save the resulting vectors in binary moded; default is |
cbow |
Use the continuous back of words model; default is |
verbose |
Whether to print output from training. |
Invisibly returns the output
.
as_word2vec
to load a pre-trained model.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# setup word2vec Julia dependency
setup_word2vec()
# sample corpus
data("macbeth", package = "word2vec.r")
# train model
model_path <- word2vec(macbeth)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.