feat: 종성, 중성 추출 함수 추가 #377
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
현재 es-hangul은 getChoseong을 이용하여 초성 추출 API를 제공하고 있습니다.
모든 한글 구성요소의 일관성을 유지하려면 중성(모음) 및 종성(종성) 추출 API도 제공하는 것이 어떨까 합니다.
resolved #365
논의거리
getChoseong,getJungseong,getJongseong모두 존재하는 자모만 추출, 공백은 그대로 유지라는 동일한 규칙을 적용합니다.그래서 '띄어 쓰기', '파이팅' 이라는 단어에 대해서 현재 다음과 같이 종성을 추출합니다.
하지만 종성 추출에서 "없는 종성"을 어떻게 다룰지는 여러 선택지가 있을 수 있습니다.
현재는 간결성과 검색/비교 활용성을 우선하여
“존재하는 자모만 추출 + 공백만 유지” 규칙을 채택했지만,
향후 유스케이스에 따라 조정 가능성이 있습니다.
PR Checklist