hangulpy
hangulpy는 es-hangul에서 영감을 받아 만든 파이썬 한글 처리 라이브러리입니다. 조사 자동 선택, 초성/부분 음절 검색, 자모 분해/조합, 로마자 표기, 숫자 변환, 한영타 교정까지 한 곳에서 제공합니다.
주요 기능
- 조사 자동 선택:
josa,josa_pick,format_josa,has_jongsung,has_batchim - 초성·구간·퍼지 검색:
hangul_search,find_hangul_spans,HangulSearcher,HangulIndex,hangul_similarity - 한글·한자 속성 검사:
is_hangul,is_complete_hangul,get_hangul_components,is_hanja,split_hanja - 자모 분해·조합·편집:
split_syllables,join_jamos,jamo_len,jamo_slice,typing_steps,map_hangul - 변환 기능:
romanize,Romanizer,standardize_pronunciation,number_to_hangul,number_to_hangul_mixed,hangul_to_number,susa,days,koen,enko,autofix
설치
pip install hangulpy
업그레이드는 아래처럼 진행할 수 있습니다.
pip install -U hangulpy
빠른 예시
from hangulpy import (
HangulSearcher,
days,
get_hangul_components,
join_jamos,
josa,
number_to_hangul_mixed,
remove_last_character,
romanize,
standardize_pronunciation,
)
print(josa("사과", "을/를")) # 사과를
searcher = HangulSearcher("ㅅㄱ")
print(searcher.search("사과는 맛있다")) # True
print(get_hangul_components("한")) # ('ㅎ', 'ㅏ', 'ㄴ')
print(join_jamos(["ㅎ", "ㅏ", "ㄴ", "ㄱ", "ㅡ", "ㄹ"])) # 한글
print(remove_last_character("전화")) # 전호
print(number_to_hangul_mixed(123456780)) # 1억2,345만6,780
print(days(29)) # 스무아흐레
print(romanize("광희문", "revised")) # gwanghuimun
print(standardize_pronunciation("굳이")) # 구지
print(romanize("오죽헌", "revised", mode="proper", capitalize=True)) # Ojukheon
print(romanize("충청북도", "revised", mode="admin")) # chungcheongbuk-do
문서
- 공식 문서
- 로마자 표기 문서
- v1.5 마이그레이션:
chosungIncludes,notallowempty,allowDoubleConsonant제거 예정
예제
- 빠른 실행 예제:
examples/quickstart.py
기여
이슈, PR, 문서 개선 모두 환영합니다.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hangulpy-1.4.1.tar.gz
(54.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
hangulpy-1.4.1-py3-none-any.whl
(50.4 kB
view details)
File details
Details for the file hangulpy-1.4.1.tar.gz.
File metadata
- Download URL: hangulpy-1.4.1.tar.gz
- Upload date:
- Size: 54.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cb8bea77a643e449500145486403c9ad7027654b859cdeb3485a6e754a1b4a4
|
|
| MD5 |
14f18c57630920ca4d7872b2968a7fc5
|
|
| BLAKE2b-256 |
a511e76370d3ce7b77cb1ab4d539fb931c8c1db3eddfb8efe5beed9343502b9c
|
File details
Details for the file hangulpy-1.4.1-py3-none-any.whl.
File metadata
- Download URL: hangulpy-1.4.1-py3-none-any.whl
- Upload date:
- Size: 50.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67a3a5806888497037ae3cc49417dd830cab11d9f70700fd833b7f8a4d3e9cd6
|
|
| MD5 |
38462bd6c711f6de7306780372efa055
|
|
| BLAKE2b-256 |
e6ef0880f5837d3a7e3432d1fda9ea502fbda32263fa9ec299f0b5a59d123b3a
|