build_tools.pyphen_syllable_extractor.interactive ================================================= .. py:module:: build_tools.pyphen_syllable_extractor.interactive .. autoapi-nested-parse:: Interactive mode for the pyphen syllable extractor. This module provides the interactive CLI workflow for single-file extraction with language selection and user prompts. Functions --------- .. autoapisummary:: build_tools.pyphen_syllable_extractor.interactive.select_language build_tools.pyphen_syllable_extractor.interactive.run_interactive Module Contents --------------- .. py:function:: select_language() Interactive prompt to select a language from supported options. :returns: The pyphen language code for the selected language, or "auto" for automatic language detection .. note:: Exits the program if the user provides invalid input after multiple attempts or requests to quit. .. py:function:: run_interactive() Interactive mode entry point for the pyphen syllable extractor CLI. Workflow: 1. Prompt user to select a language (or 'auto' for automatic detection) 2. Configure extraction parameters (min/max syllable length) 3. Prompt for input file path 4. Extract syllables from input file (with optional auto-detection) 5. Generate timestamped output filenames 6. Save syllables and metadata to separate files 7. Display summary to console Language Detection: - If 'auto' is selected and langdetect is installed, the tool will automatically detect the language of the input text - Detection requires at least 20-50 characters for reliable results - Falls back to English (en_US) if detection fails Output Files: - YYYYMMDD_HHMMSS.syllables.LANG.txt: One syllable per line, sorted - YYYYMMDD_HHMMSS.meta.LANG.txt: Extraction metadata and statistics Both files are saved to _working/output/ by default.