WordVectors.Rd
Convert the output of word_vectors
into a convenient reference class.
WordVectors
An object of class R6ClassGenerator
of length 24.
All methods applicable to objects of class wordvectors
as returned
by word_vectors
are valid here. See their respective man pages
for documentation on their arguments and return values.
# NOT RUN { # setup word2vec Julia dependency setup_word2vec() # sample corpus data("macbeth", package = "word2vec.r") # train model model_path <- word2vec(macbeth) # get word vectors model <- word_vectors(model_path) wv <- WordVectors$new(model) wv$get_vector("king") wv$in_vocabulary("cake") # }