R/RcppExports.R

Defines functions d2vec_nearest d2vec w2v_read_binary w2v_nearest_vector w2v_nearest w2v_embedding w2v_dictionary w2v_save_model w2v_load_model w2v_train

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

w2v_train <- function(trainFile, modelFile, stopWordsFile, minWordFreq = 5L, size = 100L, window = 5L, expTableSize = 1000L, expValueMax = 6L, sample = 0.001, withHS = FALSE, negative = 5L, threads = 1L, iterations = 5L, alpha = 0.05, withSG = FALSE, wordDelimiterChars = " \n,.-!?:;/\"#$%&'()*+<=>@[]\\^_`{|}~\t\v\f\r", endOfSentenceChars = ".\n?!", verbose = FALSE, normalize = TRUE) {
    .Call('_word2vec_w2v_train', PACKAGE = 'word2vec', trainFile, modelFile, stopWordsFile, minWordFreq, size, window, expTableSize, expValueMax, sample, withHS, negative, threads, iterations, alpha, withSG, wordDelimiterChars, endOfSentenceChars, verbose, normalize)
}

w2v_load_model <- function(file, normalize = TRUE) {
    .Call('_word2vec_w2v_load_model', PACKAGE = 'word2vec', file, normalize)
}

w2v_save_model <- function(ptr, file) {
    .Call('_word2vec_w2v_save_model', PACKAGE = 'word2vec', ptr, file)
}

w2v_dictionary <- function(ptr) {
    .Call('_word2vec_w2v_dictionary', PACKAGE = 'word2vec', ptr)
}

w2v_embedding <- function(ptr, x) {
    .Call('_word2vec_w2v_embedding', PACKAGE = 'word2vec', ptr, x)
}

w2v_nearest <- function(ptr, x, top_n = 10L, min_distance = 0.0) {
    .Call('_word2vec_w2v_nearest', PACKAGE = 'word2vec', ptr, x, top_n, min_distance)
}

w2v_nearest_vector <- function(ptr, x, top_n = 10L, min_distance = 0.0) {
    .Call('_word2vec_w2v_nearest_vector', PACKAGE = 'word2vec', ptr, x, top_n, min_distance)
}

w2v_read_binary <- function(modelFile, normalize, n) {
    .Call('_word2vec_w2v_read_binary', PACKAGE = 'word2vec', modelFile, normalize, n)
}

d2vec <- function(ptr, x, wordDelimiterChars = " \n,.-!?:;/\"#$%&'()*+<=>@[]\\^_`{|}~\t\v\f\r") {
    .Call('_word2vec_d2vec', PACKAGE = 'word2vec', ptr, x, wordDelimiterChars)
}

d2vec_nearest <- function(ptr_w2v, ptr_d2v, x, wordDelimiterChars = " \n,.-!?:;/\"#$%&'()*+<=>@[]\\^_`{|}~\t\v\f\r") {
    .Call('_word2vec_d2vec_nearest', PACKAGE = 'word2vec', ptr_w2v, ptr_d2v, x, wordDelimiterChars)
}

Try the word2vec package in your browser

Any scripts or data that you put into this service are public.

word2vec documentation built on July 2, 2021, 5:07 p.m.