Word2Phrases

word2phrase(train, output = NULL, min_count = 5L, threshold = 100L,
  debug = 2L)

Arguments

train

Use text data from file to train the model.

output

Use file to save the resulting word vectors / word clusters.

min_count

This will discard words that appear less than \(n\) times; default is 5L.

threshold

The numeric value represents the threshold for forming the phrases (higher means less phrases); default 100L.

debug

Set the debug mode (default = 2L = more info during training)

Examples

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

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

# train model
model_path <- word2phrase(macbeth)
# }