Generate a word clusters from the model file.

word_clusters(file)

# S3 method for word2clusters
word_clusters(file)

Arguments

file

Path to model, output of word2clusters or as_word2clusters.

See also

Examples

# NOT RUN {
# setup word2vec Julia dependency
setup_word2vec()

# sample corpus
data("macbeth", package = "word2vec.r")

# train model
model_path <- word2clusters(macbeth, classes = 50L)

# get word vectors
model <- word_clusters(model_path)
# }