textrecipes
Preprocessing recipe steps for turning text into features for R models
Text features finally stay sparse all the way to the model.
◆Recent moves
- 1y ago
Hashing and TF-IDF steps can emit sparse vectors
⚡ SPARKAdds a sparse argument to the four steps that produce the widest output — hashing, text hashing, term frequency and TF-IDF — so they emit sparse vectors instead of dense columns. This is the piece that makes tidymodels' new sparse fitting path actually usable on text.
View source ↗ - 1y ago
step_textfeatures() sped up; clean_levels NA bug fixed
Makes step_textfeatures() faster and more robust, fixes step_clean_levels() producing NAs on character columns, and improves the tidy-method documentation so ?tidy.step_*() routes to the step's own page. Mostly documentation, with one real bug underneath.
View source ↗ - 2y ago
textfeatures dependency dropped; politeness feature removed
Drops textfeatures from Suggests and removes the politeness feature from step_textfeatures(). A capability removal forced by a dependency, and one that changes the columns an existing recipe produces.
View source ↗ - 2y ago
untokenize and normalization return factors
step_untokenize() and step_normalization() now return factors rather than strings. A type correction consistent with the wider output-type cleanup running through this package.
View source ↗ - 2y ago
keep_original_cols everywhere; hashing column order fixed
Completes keep_original_cols coverage so every step that creates columns has it, adds an informative error when step_clean_names() is missing non-standard role columns, and fixes hashing steps that inserted new columns before old ones. The column-ordering bug would have silently changed downstream positional references.
View source ↗ - 3y ago
Tunable arguments documented; name collisions now error
Documents which arguments are tunable on each step, makes column name collisions error informatively, and fixes step_tf() not being tunable on its weight argument. Discoverability work — a tunable argument nobody knows about is not tunable in practice.
View source ↗