build_tools.nltk_syllable_extractor.interactive
Interactive mode for the NLTK syllable extractor.
This module provides the interactive CLI workflow for single-file extraction using NLTK’s CMU Pronouncing Dictionary. Unlike the pyphen extractor, this tool only supports English (CMUDict limitation).
Functions
Interactive mode entry point for the NLTK syllable extractor CLI. |
Module Contents
- build_tools.nltk_syllable_extractor.interactive.run_interactive()[source]
Interactive mode entry point for the NLTK syllable extractor CLI.
- Workflow:
Display tool information and CMUDict notice
Configure extraction parameters (min/max syllable length)
Prompt for input file path
Extract syllables using CMUDict + onset/coda principles
Generate timestamped output filenames
Save syllables and metadata to separate files
Display summary to console
- Output Files:
YYYYMMDD_HHMMSS.syllables.en_US.txt: One syllable per line, sorted
YYYYMMDD_HHMMSS.meta.en_US.txt: Extraction metadata and statistics
Both files are saved to _working/output/ by default.