A simple utility to convert between Hangul syllables and their individual components (initial consonant, medial vowel, and final consonant).
- Convert from individual Hangul components to a combined syllable.
- Decompose a Hangul syllable into its individual components.
- Converting to a Syllable:
syllable = composer(initial, medial, final)
Example:
syllable = composer('ㅅ', 'ㅏ', 'ㅇ')
print(syllable) # Outputs: 상
- Decomposing a Syllable:
initial, medial, final = decomposer(syllable)
Example:
initial, medial, final = decomposer('상')
print(initial, medial, final) # Outputs: ㅅ ㅏ ㅇ
This README and the associated code were initially generated by OpenAI's GPT-4 and subsequently modified for specific use cases.