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.2.0.tar.gz
(6.0 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.2.0.tar.gz.
File metadata
- Download URL: hangul_keyboard-0.2.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e1d064f173524d345a3d4c3aac3fa7237a751940a3277977b8ff3d923b880ef
|
|
| MD5 |
812f6169f538c1d9e20df1456ccb1cae
|
|
| BLAKE2b-256 |
2e1833a23b19ef94987ab45330f56eb0ad3d6a23bc93396b6087284dccb15214
|
File details
Details for the file hangul_keyboard-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hangul_keyboard-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76f202632bcc1b35dda3bdd9d8500d50015ca31d2937a1956c8cc38038258312
|
|
| MD5 |
3b14c8ceed99a6651b689a8c3a424e81
|
|
| BLAKE2b-256 |
a33dbb1817c721c6688bf9ea4503fd6ac68e8c5cd44a620417e227ee337812ac
|