Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MAKEMOD – Generate %mod Tier from Pronunciation Lexicon

Status: Current Last updated: 2026-05-12 11:05 EDT

Purpose

Reimplements CLAN’s MAKEMOD command, which looks up each countable word on main tiers in a pronunciation lexicon (CMU dictionary format) and generates a %mod dependent tier with the phonemic transcription. Words not found in the lexicon are marked with ???.

Usage

chatter clan makemod --lexicon cmulex.cut file.cha

Options

OptionTypeDefaultDescription
-l, --lexiconpath(required)Path to the pronunciation lexicon file
--all-alternativesboolfalseShow all alternative pronunciations (default: first only)
-o, --outputpathstdoutOutput CHAT file path

External Data

Requires a CMU-format lexicon file. CLAN ships a cmulex.cut in its lib/ directory and uses that by default; chatter clan makemod does not bundle a lexicon, so --lexicon must be passed explicitly.

Format: WORD phoneme1 phoneme2 ... (one entry per line). Lines starting with # or % are treated as comments. Words with (N) suffix (variant number like READ(2)) are treated as pronunciation alternatives for the base word.

Behavior

For each utterance, the transform:

  1. Extracts countable words from the main tier (using the framework’s countable_words() utility).
  2. Looks up each word in the loaded pronunciation lexicon (case-insensitive).
  3. Builds a %mod dependent tier with the phonemic transcriptions. Words not found are marked ???.
  4. Appends the %mod tier to the utterance’s dependent tiers.

Differences from CLAN

  • Operates on AST rather than raw text.
  • Uses the framework transform pipeline (parse -> transform -> serialize -> write).