read_word2vec: A helper function for reading word2vec format

View source: R/misc.R

read_word2vecR Documentation

A helper function for reading word2vec format

Description

This function reads word2vec text format and return a dense matrix that can be used by this package. The file can have or have not the "verification line", i.e. the first line contains the dimensionality of the matrix. If the verification line exists, the function will check the returned matrix for correctness.

Usage

read_word2vec(x)

Arguments

x

path to your text file

Value

a dense matrix


sweater documentation built on Nov. 7, 2023, 5:08 p.m.