tests/testthat/_snaps/untokenize.md

bad args

Code
  prep(step_untokenize(recipe(~., data = mtcars), sep = 0))
Condition
  Error in `step_untokenize()`:
  Caused by error in `prep()`:
  ! `sep` must be a single string, not the number 0.

bake method errors when needed non-standard role columns are missing

Code
  bake(trained, new_data = tokenized_test_data[, -1])
Condition
  Error in `step_untokenize()`:
  ! The following required column is missing from `new_data`: text.

empty printing

Code
  rec
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  outcome:    1
  predictor: 10

  -- Operations 
  * Untokenization for: <none>
Code
  rec
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  outcome:    1
  predictor: 10

  -- Training information 
  Training data contained 32 data points and no incomplete rows.

  -- Operations 
  * Untokenization for: <none> | Trained

printing

Code
  print(rec)
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  predictor: 1

  -- Operations 
  * Tokenization for: text
  * Untokenization for: text
Code
  prep(rec)
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  predictor: 1

  -- Training information 
  Training data contained 4 data points and no incomplete rows.

  -- Operations 
  * Tokenization for: text | Trained
  * Untokenization for: text | Trained


tidymodels/textrecipes documentation built on June 12, 2025, 7:24 p.m.