Skip to content

Fix 874 entries: N before velar K/G should be NG#52

Open
ptarjan wants to merge 1 commit intocmusphinx:masterfrom
ptarjan:fix-velar-nasal
Open

Fix 874 entries: N before velar K/G should be NG#52
ptarjan wants to merge 1 commit intocmusphinx:masterfrom
ptarjan:fix-velar-nasal

Conversation

@ptarjan
Copy link
Copy Markdown

@ptarjan ptarjan commented Feb 22, 2026

Summary

In English, /n/ always assimilates to the velar nasal [ŋ] before /k/ or /g/. The CMU dictionary already uses NG correctly for most entries (e.g., THINK → TH IH1 NG K), but 874 entries still had plain N before K or G.

This is a systematic phonological rule with no exceptions in English — the N phoneme cannot surface before velar consonants without assimilating.

Examples

Word Before After
AANCOR AA1 N K AO2 R AA1 NG K AO2 R
ANGLOPHILE AE1 N G L AH0 F AY2 L AE1 NG G L AH0 F AY2 L
ANCHETA AA0 N K EH1 T AH0 AA0 NG K EH1 T AH0
WINGATE W IH1 N G EY0 T W IH1 NG G EY0 T

Note that many entries were already correct (e.g., ANCHOR → AE1 NG K ER0, THINK → TH IH1 NG K). This PR fixes the remaining inconsistencies.

Methodology

Scanned all entries for sequences where the N phoneme is immediately followed by K or G, and replaced N with NG in those positions. The change is purely mechanical — no judgment calls required, since velar nasal assimilation before velar stops is exceptionless in English.

Reference

Ladefoged & Johnson (2014), A Course in Phonetics: /n/ assimilates to [ŋ] before velar consonants /k, g/ in all English dialects.

🤖 Generated with Claude Code

In English, /n/ always assimilates to the velar nasal [ŋ] before /k/
or /g/. The CMU dictionary already uses NG correctly for most entries
(e.g., THINK → TH IH1 NG K), but 874 entries still had plain N
before K or G.

Examples of corrections:
- BANK: B AE1 N K → B AE1 NG K
- ANCHOR: already correct (AE1 NG K ER0)
- ANGLOPHILE: AE1 N G L → AE1 NG G L
- ANCHETA: AA0 N K → AA0 NG K

This is a systematic phonological rule with no exceptions in English
— the N phoneme cannot occur before velar consonants without
assimilating. See Ladefoged & Johnson (2014) "A Course in Phonetics"
for reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jsalsman
Copy link
Copy Markdown

jsalsman commented Feb 25, 2026

According to the official CMUDICT home page, the GitHub source for the CMUDICT file should be at https://github.com/Alexir/CMUdict -- are these (very good and much appreciated) changes being submitted there?

Please see #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants