word2phrase: Word2Phrases

Description Usage Arguments Examples

View source: R/word2phrase.R

Description

Word2Phrases

Usage

1
2
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

 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 <- word2phrase(macbeth)

## End(Not run)

news-r/word2vec.r documentation built on Nov. 4, 2019, 9:41 p.m.