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

run_interactive()

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:
  1. Display tool information and CMUDict notice

  2. Configure extraction parameters (min/max syllable length)

  3. Prompt for input file path

  4. Extract syllables using CMUDict + onset/coda principles

  5. Generate timestamped output filenames

  6. Save syllables and metadata to separate files

  7. 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.