Skip to contents

Creates a zero-dependency, offline, deterministic natural-language parser that compiles English statistical and simulation study descriptions into validated spec_ir objects, identifies underspecified parameters for structured clarification, and documents inferred defaults.

Usage

translator_rule(strict = FALSE)

Arguments

strict

Logical; reserved for future strict-parsing extensions.

Value

An S3 object of class c("spec_translator_rule", "spec_translator").

Examples

tr <- translator_rule()
res <- nl_to_spec("2-level power simulation with 50 schools, 20 students per school, ICC 0.2", tr)
res$spec
#> 
#> ── spec_ir v1.2.0 [valid] ──
#> 
#> Title: 2-Level School Linear Power Simulation
#> Design: power_analysis | Estimator: lmer
#> Hierarchy: 2-level (50 schools x 20 students = 1000 total; ICC = 0.2)
#> Outcome: y (gaussian, link = identity)
#> Predictors: x1 [L1, normal, beta=0.3]
#> Simulation: 200 reps | alpha = 0.05 | seed = 2026 | grid: none