Metadata-Version: 2.4
Name: hangulpy
Version: 1.3.1
Summary: A comprehensive Python library for Korean language processing, inspired by es-hangul
Home-page: https://github.com/gaon12/hangulpy
Author: Jeong Gaon
Author-email: Jeong Gaon <gokirito12@gmail.com>
Maintainer-email: Jeong Gaon <gokirito12@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/gaon12/hangulpy
Project-URL: Documentation, https://hangulpy.uiharu.dev
Project-URL: Repository, https://github.com/gaon12/hangulpy
Project-URL: Bug Tracker, https://github.com/gaon12/hangulpy/issues
Project-URL: Changelog, https://github.com/gaon12/hangulpy/releases
Keywords: korean,hangul,josa,particle,chosung,romanization,korean-language,nlp,text-processing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=7.4.0; extra == "test"
Requires-Dist: pytest-cov>=4.1.0; extra == "test"
Provides-Extra: lint
Requires-Dist: black>=23.0.0; extra == "lint"
Requires-Dist: ruff>=0.1.0; extra == "lint"
Requires-Dist: mypy>=1.5.0; extra == "lint"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# hangulpy

[![PyPI Version](https://img.shields.io/pypi/v/hangulpy.svg)](https://pypi.org/project/hangulpy/)
[![License](https://img.shields.io/github/license/gaon12/hangulpy.svg)](https://github.com/gaon12/hangulpy/blob/main/LICENSE)
[![Python Versions](https://img.shields.io/pypi/pyversions/hangulpy.svg)](https://pypi.org/project/hangulpy/)

`hangulpy`는 [es-hangul](https://github.com/toss/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`

## 설치

```bash
pip install hangulpy
```

업그레이드는 아래처럼 진행할 수 있습니다.

```bash
pip install -U hangulpy
```

## 빠른 예시

```python
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
```

## 문서

- [공식 문서](https://hangulpy.uiharu.dev)
- [로마자 표기 문서](https://hangulpy.uiharu.dev/docs/api/conversions/romanize)

## 예제

- 빠른 실행 예제: `examples/quickstart.py`

## 기여

이슈, PR, 문서 개선 모두 환영합니다.
