Skip to main content

minimize

Function minimize 

Source
pub fn minimize(
    grammar: &Grammar,
    examples: &[String],
    opts: MinimizeOptions,
) -> MinimizeResult
Expand description

Generalises and minimises an inferred grammar under an MDL objective.

The search is greedy and deterministic: candidates are enumerated in rule order, scored by strict MDL decrease, gated by positive-example recall and a sampled precision proxy against the input grammar, then the best admissible candidate is applied until fixpoint or opts.max_iterations.