prepare_automated_for_review: Prepare the Automated Corrections Matrix for Review

View source: R/correct_changes.R

prepare_automated_for_reviewR Documentation

Prepare the Automated Corrections Matrix for Review

Description

Reconstructs the automated spell-check corrections matrix correct_changes() itself hands to its edit_fn – restoring matrix-ness and the correspondence-matrix row name for a single-row selection (see this file's own header comment for the real bug this fixes), and padding with enough "to_#" columns for the widest multi-word "from" entry. Exposed as its own function so textcleaner_shiny's corrections-review module can render the exact same shape correct_changes() itself will later expect back from edit_fn – computing this independently (e.g. from the raw, un-padded res$spellcheck$automated) produces a narrower matrix than correct_changes()'s own internal copy, which errors with "non-conformable arrays" the moment they're compared.

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

prepare_automated_for_review(res)

Arguments

res

List. The in-progress textcleaner() result, with $spellcheck$automated/$correspondence already populated

Value

The padded automated-corrections matrix, ready to hand to automated_edit()/automated_edit_server (or any other edit_fn)

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>


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