ft_train: Train a Model

View source: R/fasttext.R

ft_trainR Documentation

Train a Model

Description

Train a new word representation model or supervised classification model.

Usage

ft_train(
  file,
  method = c("supervised", "cbow", "skipgram"),
  control = ft_control(),
  ...
)

Arguments

file

a character string giving the location of the input file.

method

a character string giving the method, possible values are 'supervised', 'cbow' and 'skipgram'.

control

a list giving the control variables, for more information see ft_control.

...

additional control arguments inserted into the control list.

Examples

## Not run: 
cntrl <- ft_control(nthreads = 1L)
model <- ft_train("my_data.txt", method="supervised", control = cntrl)

## End(Not run)

fastTextR documentation built on June 22, 2024, 7:16 p.m.