Return all the words given a cluster.

get_words(model, cluster = 0L)

# S3 method for wordclusters
get_words(model, cluster = 0L)

Arguments

model

A model as returned by word_clusters.

cluster

Cluster number as integral.

Examples

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

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

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

# get word vectors
model <- word_clusters(model_path)

# get cluster
get_words(model, 2L)
# }