로마자

dkssudgktpdy!

I made another thing. It’s really uninteresting, and the development process was pretty similar to that of Type! since it’s also just a static site on GitHub Pages that uses Svelte, so I won’t say anything about that.

Anyway, you can convert from Revised Romanization to Hangeul using this simple little website. My friend needed it.

The Algorithm™

I used a reverse-tree-structure to convert Romaja to Hangul, using $ as a fallback.

For instance, to convert ‘ga’ to 가, we use:

{
  // ...
  "a": {
    "g": {
      "$": "가"
    },
    "$": "아",
    // ...
  },
  // ...
}

Working backwards through the string, we can use the fallback value if the next character is not found.