A comprehensive Python library for Korean language processing, inspired by es-hangul
Project description
hangulpy
hangulpy는 es-hangul에서 영감을 받아 만든 파이썬 한글 처리 라이브러리입니다. 조사 자동 선택, 초성/부분 음절 검색, 자모 분해/조합, 로마자 표기, 숫자 변환, 한영타 교정까지 한 곳에서 제공합니다.
주요 기능
- 조사 자동 선택:
josa,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,hangul_syllable - 변환 기능:
romanize,Romanizer,number_to_hangul,hangul_to_number,koen,enko,autofix
설치
pip install hangulpy
업그레이드는 아래처럼 진행할 수 있습니다.
pip install -U hangulpy
빠른 예시
from hangulpy import (
HangulSearcher,
get_hangul_components,
join_jamos,
josa,
romanize,
)
print(josa("사과", "을/를")) # 사과를
searcher = HangulSearcher("ㅅㄱ")
print(searcher.search("사과는 맛있다")) # True
print(get_hangul_components("한")) # ('ㅎ', 'ㅏ', 'ㄴ')
print(join_jamos(["ㅎ", "ㅏ", "ㄴ", "ㄱ", "ㅡ", "ㄹ"])) # 한글
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.1.tar.gz
(28.5 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.1-py3-none-any.whl
(29.0 kB
view details)
File details
Details for the file hangulpy-1.3.1.tar.gz.
File metadata
- Download URL: hangulpy-1.3.1.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d658595766dd39c7d6a8988fa8cb11cd32e4abe9444cfcb0a99ca152b9f57aa
|
|
| MD5 |
143a857fa187b2751fe3243da9be9792
|
|
| BLAKE2b-256 |
62d7f10195f63354d19288179e1fb6267fd9bbc8adabd2716634340eae76137c
|
File details
Details for the file hangulpy-1.3.1-py3-none-any.whl.
File metadata
- Download URL: hangulpy-1.3.1-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
704fac5f226e72a1f541d4928592933ae3a3c02fa245e30ba9a4b7844d5f2e74
|
|
| MD5 |
56537e1365486a0a8d8514a00a080c21
|
|
| BLAKE2b-256 |
d2b0e43c3e96f7d19360fafa6ecda13eb00d52d6fe6e541edf78ecb3e0ad410f
|