build_tools.syllable_walk_tui.services.generation ================================================= .. py:module:: build_tools.syllable_walk_tui.services.generation .. autoapi-nested-parse:: Walk generation service for Syllable Walker TUI. Provides functions for generating phonetic walks using SyllableWalker. Classes ------- .. autoapisummary:: build_tools.syllable_walk_tui.services.generation.WalkResult Functions --------- .. autoapisummary:: build_tools.syllable_walk_tui.services.generation.generate_walks_for_patch Module Contents --------------- .. py:class:: WalkResult Result from walk generation. .. py:attribute:: walks :type: list[str] .. py:attribute:: error :type: str | None :value: None .. py:function:: generate_walks_for_patch(patch) Generate walks for a patch using SyllableWalker. This function: 1. Creates SyllableWalker from patch's annotated data 2. Filters syllables by min/max length constraints 3. Generates walks with current patch parameters 4. Returns formatted walk strings :param patch: PatchState with corpus data and walk parameters :returns: WalkResult with walks list and optional error message .. note:: Caller is responsible for validating patch.is_ready_for_generation() before calling this function. .. admonition:: Examples >>> result = generate_walks_for_patch(patch) >>> if result.error: ... print(f"Generation failed: {result.error}") >>> else: ... for walk in result.walks: ... print(walk) # "syl1 → syl2 → syl3"