View source: R/refine_by_rulebook.R
| refine_by_rulebook | R Documentation |
Apply a compiled semantic rulebook sequentially to a target semantic assertion vector.
refine_by_rulebook(
x,
target,
rulebook,
prefix = NULL,
keep_intermediate = TRUE,
final_name = "final"
)
x |
A data frame. |
target |
Bare or quoted name of the initial semantic assertion column. |
rulebook |
A compiled rulebook object created with
|
prefix |
Prefix used for generated refinement columns. Defaults to the target column name. |
keep_intermediate |
Logical.
If |
final_name |
Name of the final refinement column. |
refine_by_rulebook() wraps an iterative refinement workflow
where each semantic refinement stage operates on the semantic
state produced by the previous stage.
The function is designed for operational semantic stabilization workflows where semantic assertions progressively mature through deterministic contextual refinement.
Each refinement stage creates a new refinement column, preserving semantic progression for inspection, auditing, and review.
Rulebooks are typically created with
compile_rulebook() and operate on semantic operationalisations
produced with:
prelabel();
as.character();
as_character();
refine().
Conceptually, the function behaves similarly to an iterative
purrr::reduce() workflow applied to semantic refinement
stages.
A tibble with progressively refined semantic assertions.
refine(), compile_rulebook()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.