TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Coloring Korean Keystrokes: 11'172 Characters

5 pointsby samtoday9 months ago

1 comment

lifthrasiir9 months ago
Hangul syllable composition is systematic enough that you could have just used some thresholding and flood fill instead. There are only 9 distinct layouts [1] possible after all, all of which can be determined via a simple decision tree, so you collect syllables for each layout and determine the optimal horizontal or vertical line to split them. That alone wouldn&#x27;t fully segment, say, 고 where a bounding box for ㄱ typically overlaps with that for ㅗ, but you can then assume that no path doesn&#x27;t belong to multiple segments (which is true for most non-novelty fonts). You can also add more branches to your decision tree if your font is too atypical to be cleanly segmented.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Hangul#Letter_placement_within_a_block" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Hangul#Letter_placement_within...</a>