Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/honest-goats-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"es-hangul": patch
---

fix: ㄴ/ㄹ 덧나는 현상에 부가 조건을 추가합니다.
2 changes: 2 additions & 0 deletions src/pronunciation/romanize/romanize.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ describe('romanize', () => {
it('ㄴ, ㄹ’이 덧나는 경우', () => {
expect(romanize('학여울')).toBe('hangnyeoul');
expect(romanize('알약')).toBe('allyak');
expect(romanize('호랑이')).toBe('horangi');
expect(romanize('빨간색이에요')).toBe('ppalgansaegieyo');
});

it('구개음화가 되는 경우', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ describe('transformNLAssimilation', () => {
});
});

it('ㄴ/ㄹ이 되기 위한 조건이지만 다음 음절이 받침이 없는 "이"로 이어지는 경우', () => {
const current = defined(disassembleCompleteCharacter('랑'));
const next = defined(disassembleCompleteCharacter('이'));

expect(transformNLAssimilation(current, next)).toEqual({
current: {
choseong: 'ㄹ',
jungseong: 'ㅏ',
jongseong: 'ㅇ',
},
next: {
choseong: 'ㅇ',
jungseong: 'ㅣ',
jongseong: '',
},
});
});

it('ㄴ/ㄹ이 되기 위한 조건이지만 현재 음절의 중성의 ∙(아래아)가 하나가 아닐 경우에는 덧나지 않고 연음규칙이 적용된다', () => {
const current = defined(disassembleCompleteCharacter('양'));
const next = defined(disassembleCompleteCharacter('이'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ㄴㄹ이_덧나는_후속음절_모음,
ㄴㄹ이_덧나서_받침_ㄴ_변환,
ㄴㄹ이_덧나서_받침_ㄹ_변환,
음가가_없는_자음,
} from '../constants';
import type { ReturnSyllables, Syllable } from './rules.types';

Expand All @@ -22,7 +23,9 @@ export function transformNLAssimilation(currentSyllable: Syllable, nextSyllable:
const ㄴㄹ이덧나는조건 =
current.jongseong && next.choseong === 'ㅇ' && arrayIncludes(ㄴㄹ이_덧나는_후속음절_모음, next.jungseong);

if (!ㄴㄹ이덧나는조건) {
const is이 = next.choseong === 음가가_없는_자음 && next.jungseong === 'ㅣ' && !next.jongseong;

if (!ㄴㄹ이덧나는조건 || is이) {
return {
current,
next,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ describe('standardizePronunciation', () => {
expect(standardizePronunciation('불여우')).toBe('불려우');
});

it('ㄴ/ㄹ이 되기 위한 조건이지만 다음 음절이 받침이 없는 "이"로 이어지는 경우', () => {
expect(standardizePronunciation('호랑이')).toBe('호랑이');
expect(standardizePronunciation('개구쟁이')).toBe('개구쟁이');
expect(standardizePronunciation('공이')).toBe('공이');
expect(standardizePronunciation('손잡이', { hardConversion: false })).toBe('손자비');
});

it('ㄴ/ㄹ이 되기 위한 조건이지만 현재 음절의 중성의 ∙(아래아)가 하나가 아닐 경우에는 덧나지 않고 연음규칙이 적용된다', () => {
expect(standardizePronunciation('고양이')).toBe('고양이');
expect(standardizePronunciation('윤여정')).toBe('윤녀정');
Expand Down