-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
Description
현재 es-hangul은 getChoseong을 이용하여 초성 추출 API를 제공하고 있습니다.
모든 한글 구성요소의 일관성을 유지하려면 중성(모음) 및 종성(종성) 추출 API도 제공하는 것이 어떨까 합니다.
getJungseong('사과'); // 'ㅏㅘ'
getJungseong('하늘'); // 'ㅏㅡ'getJongseong('별'); // 'ㄹ'
getJongseong('하늘'); // 'ㄹ'
getJongseong('가방'); // 'ㅇ'
getJongseong('사과'); // '' (받침 없음)라이브러리의 일관성과 유용성이 확장될 것입니다.
Possible Solution
getChoseong과 비슷한 방식으로 구현할 수 있다고 생각합니다.
각 음절을 유니코드 한글 계산을 통해 초성/중성/종성으로 분해하는 방식입니다.
getJungseong(word: string): string
getJongseong(word: string): stringetc.
이 기능이 괜찮다면 제가 구현 및 테스트를 코드를 PR 해도 될까요?
Metadata
Metadata
Assignees
Labels
No labels