dims_of_word_vecs: dimensions of a word vectors file

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

dimensions of a word vectors file

Usage

1
dims_of_word_vecs(input_file = NULL, read_delimiter = "\n")

Arguments

input_file

a character string specifying a valid path to a text file

read_delimiter

a character string specifying the row delimiter of the text file

Details

This function takes a valid path to a file and a file delimiter as input and estimates the dimensions of the word vectors by using the first row of the file.

Value

a numeric value

Examples

1
2
3
4
5
library(textTinyR)

PATH = system.file("example_files", "word_vecs.txt", package = "textTinyR")

dimensions = dims_of_word_vecs(input_file = PATH)

textTinyR documentation built on Oct. 26, 2021, 9:06 a.m.