A comprehensive Python library for Korean language processing, inspired by es-hangul
Project description
hangulpy
hangulpy는 es-hangul에서 영감을 받아 만든 파이썬 한글 처리 라이브러리입니다. 조사 자동 선택, 초성/부분 음절 검색, 자모 분해/조합, 로마자 표기, 숫자 변환, 한영타 교정까지 한 곳에서 제공합니다.
주요 기능
- 조사 자동 선택:
josa,josa_pick,has_jongsung,has_batchim - 초성/부분 음절 검색:
get_chosung_string,chosung_includes,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,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
문서
예제
- 빠른 실행 예제:
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.4.0.tar.gz
(35.7 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.0-py3-none-any.whl
(35.3 kB
view details)
File details
Details for the file hangulpy-1.4.0.tar.gz.
File metadata
- Download URL: hangulpy-1.4.0.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cc95dce5906366507d88fdc8772b2f71893dc7d4ea360911d54c28df6aed351
|
|
| MD5 |
a9d18d64a9c4c535441aad60f6ffbef9
|
|
| BLAKE2b-256 |
1a2ed3b94d219d32092c4ddfcb2dc10913b0e66ce0691a8ccb576315cb5d2329
|
File details
Details for the file hangulpy-1.4.0-py3-none-any.whl.
File metadata
- Download URL: hangulpy-1.4.0-py3-none-any.whl
- Upload date:
- Size: 35.3 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 |
ef99c61c6a24bf63e24a49b6d86ca4cb902a0b6a93fc077886aa198ed6495a96
|
|
| MD5 |
6c013ec11367787fed0b56e2518aa932
|
|
| BLAKE2b-256 |
e1c969e7c82a177399e6e298c5ef418b2099ec2ea3802b0a4c28fd2b248bef91
|