A comprehensive Python library for Korean language processing, inspired by es-hangul
Project description
hangulpy
hangulpy는 es-hangul에서 영감을 받아 만든 파이썬 한글 처리 라이브러리입니다. 조사 자동 선택, 초성/부분 음절 검색, 자모 분해/조합, 로마자 표기, 숫자 변환, 한영타 교정까지 한 곳에서 제공합니다.
주요 기능
- 조사 자동 선택:
josa,josa_pick,has_jongsung - 초성/부분 음절 검색:
get_chosung_string,chosungIncludes,hangul_contains,hangul_search,HangulSearcher - 한글 속성 검사:
is_hangul,is_complete_hangul,get_hangul_components - 자모 분해/조합:
decompose_hangul_string,split_hangul_string,split_syllables,join_jamos,combine_vowels,remove_last_character - 변환 기능:
romanize,Romanizer,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,
)
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(romanize("오죽헌", "revised", mode="proper", capitalize=True)) # Ojukheon
print(romanize("충청북도", "revised", mode="admin")) # chungcheongbuk-do
문서
예제
- 빠른 실행 예제:
examples/quickstart.py
기여
이슈, PR, 문서 개선 모두 환영합니다.
Project details
Release history Release notifications | RSS feed
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.3.2.tar.gz
(32.3 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.3.2-py3-none-any.whl
(32.4 kB
view details)
File details
Details for the file hangulpy-1.3.2.tar.gz.
File metadata
- Download URL: hangulpy-1.3.2.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60923f28534c130b018028971739499ce645016fdf81839c3db48d0666d3a5c8
|
|
| MD5 |
f18d57f502bd1f41e00e1bacd73e32e6
|
|
| BLAKE2b-256 |
9d62436f34974d6dadbe5da7b1031d8f11733eac67074abc18a3c8121f04b3e1
|
File details
Details for the file hangulpy-1.3.2-py3-none-any.whl.
File metadata
- Download URL: hangulpy-1.3.2-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfaa8e33ade85d9ceab4b5b30412d4498456a261693c5c9a48bcab2b064c015e
|
|
| MD5 |
3d6840b6319fead8bf5c4ac188dfbd4e
|
|
| BLAKE2b-256 |
068a6fc3bfd6e1fe34882d76816e0e147c47a8381d1449b9e9678958cd3b037e
|