besceaLoadData: Load new data to bescea model

View source: R/besceaLoadData.R

besceaLoadDataR Documentation

Load new data to bescea model

Description

Load new data to bescea model for searching

Usage

besceaLoadData(
  data,
  text_field = text_field,
  unique_id = unique_id,
  modelname = NULL,
  searchname = "my_search",
  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

Defaults to NULL. If you are loading data to a FastText model built using besceaBuildModel, put the name of model here. The model should be saved as 3 different files in the 'models' folder.

searchname

Optional name that appears at the top of the Shiny app

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

# Build model called "my_model" first
besceaBuildModel(data = sneapsters[1:100,], 
  text_field = post_text,
  unique_id = textid, 
  min_word_count = 1,
  epochs = 1, 
  modelname = "my_model")
  
# Then load data and run using "my_model"  
besceaLoadData(data = sneapsters[1:100,], 
  text_field = post_text,
  unique_id = textid,
  modelname = "my_model")

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