besceaBuildModel: Build bescea model

View source: R/besceaBuildModel.R

besceaBuildModelR Documentation

Build bescea model

Description

Build bescea model from a data frame containing a single text column and unique identifier column.

Usage

besceaBuildModel(
  data,
  text_field,
  unique_id,
  modelname = "my_model",
  min_word_count = 1,
  epochs = 25,
  spacy_nlp_model = NULL,
  ...
)

Arguments

data

Data frame, each document is a row/observation.

text_field

Text field from data, unquoted

unique_id

Unique identifier from data, unquoted

modelname

Your model name, to be referred to when loading new data. The model will be saved as 3 different files in the 'models' folder. This value will be the modelname arguement when running this model with besceaLoadData() or besceaApp().

min_word_count

Only consider tokens with at least n occurrences in the corpus

epochs

Number of FastText epochs. More is generally better but takes longer.

spacy_nlp_model

Defaults to NULL. When Python is run, SpaCy will load "en_core_web_sm" unless this argument is present. In that case, SpaCy will look for an nlp model in the location you provide.

...

Arguments passed from other functions

Examples

besceaBuildModel(data = sneapsters[1:100,], 
  text_field = post_text,
  unique_id = textid, 
  min_word_count = 1,
  epochs = 1, 
  modelname = "my_model")

harryahlas/bescea documentation built on July 3, 2022, 7:13 p.m.