build_tools.syllable_walk_tui.services.combiner_runner
Name combiner execution service.
Mirrors the CLI behavior of build_tools.name_combiner.
Classes
Result from combiner execution. |
Functions
|
Run name_combiner for a patch (mirrors CLI behavior exactly). |
Module Contents
- class build_tools.syllable_walk_tui.services.combiner_runner.CombinerResult[source]
Result from combiner execution.
- output_path: pathlib.Path
- build_tools.syllable_walk_tui.services.combiner_runner.run_combiner(patch, combiner_state)[source]
Run name_combiner for a patch (mirrors CLI behavior exactly).
- This function mirrors the CLI:
- python -m build_tools.name_combiner
–run-dir <patch.corpus_dir> –syllables <syllables> –count <count> –seed <seed> –frequency-weight <frequency_weight>
Output is written to: <run-dir>/candidates/{prefix}_candidates_{N}syl.json
- TUI Extension:
When combiner_state.syllable_mode == “all”, this function also: - Generates candidates for 2, 3, and 4 syllables - Writes per-length files: {prefix}_candidates_2syl.json, etc. - Writes a combined file: {prefix}_candidates_all.json - Returns combined candidates in the result
- Parameters:
patch (build_tools.syllable_walk_tui.modules.oscillator.PatchState) – PatchState with corpus data
combiner_state (build_tools.syllable_walk_tui.modules.generator.CombinerState) – CombinerState with generation parameters
- Returns:
CombinerResult with generated candidates and metadata
- Return type:
Note
Caller is responsible for validating patch state before calling.