Documentation
Usage
pronunciation
standardizePronunciation

standardizePronunciation

Change the Hangul string to standard pronunciation.

For detailed examples, see below.

function standardizePronunciation(
  // Input a Hangul string
  hangul: string,
  options: {
    // Set whether to apply hard sounds. Default is true."
    hardConversion: boolean;
  } = { hardConversion: true }
): string;

Examples

standardizePronunciation('디귿이'); // '디그시'
standardizePronunciation('굳이'); // '구지'
standardizePronunciation('담요'); // '딤뇨'
standardizePronunciation('침략'); // '침냑'
standardizePronunciation('먹는'); // '멍는'
standardizePronunciation('신라'); // '실라'
standardizePronunciation('놓고'); // '노코'
standardizePronunciation('곧이듣다'); // '고지듣따'
standardizePronunciation('곧이듣다', { hardConversion: false }); // '고지듣다'
standardizePronunciation('닦다'); // '닥따'
standardizePronunciation('닦다', { hardConversion: false }); // '닥다'
standardizePronunciation('있다'); // '읻따'
standardizePronunciation('있다', { hardConversion: false }); // '읻다'
standardizePronunciation('핥다'); // '할따'
standardizePronunciation('핥다', { hardConversion: false }); // '할다'
standardizePronunciation('젊다'); // '점따'
standardizePronunciation('젊다', { hardConversion: false }); // '점다'

Demo


Notice on Exception Cases

According to the Regulations on Korean Orthography (opens in a new tab), Chapter 7 "Addition of Sounds" - Article 29 states:

"In compound words and derivatives, when the final sound of the first word or prefix is a consonant and the first syllable of the following word or suffix begins with '이, 야, 여, 요, 유' (i, ya, yeo, yo, yu), the sound 'ㄴ' (n) is added, making it '니, 냐, 녀, 뇨, 뉴' (ni, nya, nyeo, nyo, nyu)."

For example:

맨입 (maen-ip) is pronounced as 맨닙 (maen-nip)

꽃잎 (kkot-ip) is pronounced as 꼰닙 (kkon-nip)

However, in the case of 전역 (jeon-yeok), according to this rule, it should be pronounced as 전녁 (jeon-nyeok). But since 전역 is not a compound or derivative word, it is exceptionally pronounced as 저녁 (jeo-nyeok).

Since it is impossible to accurately determine whether a word is compound or derivative using only pure TypeScript logic without external linguistic data, these exceptions are managed in a separate constant list.

Therefore, if you come across any additional words that require such exception handling, we highly encourage your contributions and feedback.