Skip to content

Instantly share code, notes, and snippets.

@RussellSprouts
RussellSprouts / stroke-count.py
Last active July 8, 2024 20:54
Finding the syllable block with the most strokes in real Korean words
# To use, `sudo apt install hunspell-ko`.
import unicodedata
f = open("/usr/share/myspell/dicts/ko.dic", "r")
# Ensure the text is composed so that each syllable is a single
# character.
normalized_text = unicodedata.normalize('NFC', f.read())