generate_text_processing_recipe: Generate a recipe for processing text data into a...

Description Usage Arguments Value

View source: R/process-data.R

Description

Adapted from work by Emil Hvitfeldt https://www.hvitfeldt.me/blog/text-classification-with-tidymodels/

Usage

1
2
3
4
5
6
7
generate_text_processing_recipe(
  formula,
  train_data,
  text_column,
  min_times = 0.01,
  max_times = 1
)

Arguments

formula

A model formula.

train_data

A data frame or tibble of the template data set.

text_column

Column containing the documents.

min_times

Numeric between 0 and 1. Minimum frequency at which a word can appear before getting removed. Defaults to 0.01.

max_times

Numeric between 0 and 1. Maximum frequency at which a word can appear before getting removed. Defaults to 1.

Value

recipes::recipe object


mdneuzerling/NLPRMetaflow documentation built on Oct. 15, 2021, 10:14 a.m.