Korean Hangul keyboard-based English to Korean converter
Project description
hangul-keyboard
A Python package for converting Roman keyboard input to Korean Hangul automatically.
Features
- Automatic Roman → Hangul conversion
- Korean input auto-detection (returns as-is if already Hangul)
- 2-Set Korean keyboard layout support
- Double consonants/vowels support (ㄲ, ㅃ, ㄳ, etc.)
- Perfect for search systems and autocomplete
Installation
pip install hangul-keyboard
Project Structure
hangul-keyboard/
├── hangul_keyboard/
│ ├── __init__.py
│ ├── core.py # Core conversion logic
│ └── mapping.py # Roman-to-Jamo mapping tables
├── tests/
│ ├── __init__.py
│ ├── test_core.py # Unit tests for core.py
│ ├── test_mapping.py # Unit tests for mapping.py
│ └── test_integration.py # Integration tests
├── README.md
├── setup.py (or pyproject.toml)
└── requirements.txt
Quick Start
from hangul_keyboard import convert_roman_to_hangul
# Basic usage
result = convert_roman_to_hangul("dkssud")
print(result) # Output: "한글"
# Already Hangul - returns as-is
result = convert_roman_to_hangul("한글")
print(result) # Output: "한글"
# Mixed with numbers and special characters
result = convert_roman_to_hangul("rk123!")
print(result) # Output: "가123!"
Testing
# Run all tests
python -m pytest tests/ -v
# Run specific test file
python -m pytest tests/test_core.py -v
python -m pytest tests/test_mapping.py -v
python -m pytest tests/test_integration.py -v
# Or use unittest
python -m unittest tests.test_core -v
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hangul_keyboard-0.1.0.tar.gz
(6.1 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
File details
Details for the file hangul_keyboard-0.1.0.tar.gz.
File metadata
- Download URL: hangul_keyboard-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1403dc28f8e10dfbd535597e58f5d4967d86b02d06951cb1de8551008a6652d5
|
|
| MD5 |
ad3274063e8551f8a72dc672abc25d78
|
|
| BLAKE2b-256 |
7f633753e8c37b353234ba1f91c8c1e38d606774a0e3c94e77e8937760eb9e59
|
File details
Details for the file hangul_keyboard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hangul_keyboard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4686974dd3b574b3af6a345922c0486b3d0e3d4f12b23c7f69a75d58de990ad6
|
|
| MD5 |
ffc1e2ea44ee9b2f10cff37316559e27
|
|
| BLAKE2b-256 |
3326d1791ffc7f3dc62258fdcf5824c2702e5f4ccd6ca21980ccd20374b9c214
|