advance_wizard: Advance the 'textcleaner_shiny()' Wizard by One Decision

View source: R/advance_wizard.R

advance_wizardR Documentation

Advance the textcleaner_shiny() Wizard by One Decision

Description

Wraps the mechanics common to every textcleaner_shiny wizard button click: builds a one-shot queued reader out of answers (typically from build_answer_burst), resumes textcleaner(continue = ...) with it, and returns whatever it stops at next – either a further $stop = TRUE/$pending decision, or the finished result.

Exported (not just internal) because inst/Shiny/'s own module files are sourced into the global environment by Shiny's own app-loading mechanism, not into the package namespace – an unexported function is not reachable from there by its bare name.

Usage

advance_wizard(
  continue,
  answers = character(0),
  search_fn = searcher::search_site,
  edit_fn = function(x) x,
  cores = 1
)

Arguments

continue

List. The current textcleaner()/spellcheck_dictionary() return value to resume from (its own $stop = TRUE/$pending state)

answers

Character vector. The answers to queue for this one resume call, typically built by build_answer_burst. Defaults to character(0) (a resume with no real answer queued – immediately stops again at the same decision, e.g. after only a GOOGLE WORD/STRING/IT click)

search_fn

Function. Passed through to textcleaner()'s own search_fn. Defaults to searcher::search_site; textcleaner_shiny() itself passes make_shiny_search_fn's closure instead

edit_fn

Function. Passed through to textcleaner()'s own edit_fn. Defaults to a no-op (function(x) x), deferring the real automated-corrections review to textcleaner_shiny()'s own later step

cores

Numeric. Passed through to textcleaner()'s own cores. Defaults to 1

Value

Whatever textcleaner() returns for this resume call – a further $stop = TRUE/$pending decision, or the finished textcleaner-classed result

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>


SemNetCleaner documentation built on Oct. 16, 2026, 5:07 p.m.