{"id":17099999,"url":"https://github.com/bergmark/transliterate","last_synced_at":"2026-05-18T10:03:34.536Z","repository":{"id":11684945,"uuid":"14195995","full_name":"bergmark/transliterate","owner":"bergmark","description":"A library for ransliterating Korean Hangeul to the latin alphabet and vice versa. Can be used from Haskell, Fay, and JavaScript","archived":false,"fork":false,"pushed_at":"2016-04-12T21:05:49.000Z","size":86,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T18:35:22.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bergmark.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-07T06:20:11.000Z","updated_at":"2019-12-05T06:33:06.000Z","dependencies_parsed_at":"2022-08-28T08:21:27.994Z","dependency_job_id":null,"html_url":"https://github.com/bergmark/transliterate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bergmark/transliterate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergmark%2Ftransliterate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergmark%2Ftransliterate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergmark%2Ftransliterate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergmark%2Ftransliterate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bergmark","download_url":"https://codeload.github.com/bergmark/transliterate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergmark%2Ftransliterate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33174091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T15:11:56.514Z","updated_at":"2026-05-18T10:03:34.494Z","avatar_url":"https://github.com/bergmark.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Changelog](CHANGELOG.md)\n\nThe Korean alphabet Hangeul (South Korea), or Chosongul (North Korea) is a surprisingly simple system consisting of 24 letters (called jamo). Once you know these 24 letters you can pretty much read it! Each syllable is combined into one hangeul block. \"an nyeong\" means hello, this is two syllables and is written as \"안녕\". 안 = an, 녕 = nyeong. You read each block from the top left, to the right/middle, and then bottom, written out as separate characters this becomes ㅇ(silent) ㅏ(a) ㄴ(n) ㄴ(n) ㅕ(yeo) ㅇ(ng).\n\nLearning to read hangeul is easy but when learning it's useful to have a tool that can do the transliteration for you so you can check that you are reading it correctly. Additionally, if you want to write Hangul on your non-korean keyboard it's pretty tricky. You need to switch keyboard layout, figure out which character you're supposed to type, and figure out where it is on the keyboard. The goal of this library is to help out in this process so you can simply type \"an nyeong\" and get the result printed out. Or in reverse, if you find \"하스켈\" somewhere the library will transliterate it back as \"ha seu kel\" and you can then hopefully figure out what it means.\n\nThis library is written in Haskell, but also compiles to JavaScript using Fay. Fay can also generate a JS wrapper for the library so you can use it as a normal JS library!\n\n## Try it out!\n\n#### Fay\n\n[Fay compiled to JS](http://www.atmat.net/transliterate/test/FayTest.html)\n\nType \"an nyeong\" into the top text field, or paste \"하스켈\" into the bottom field to see it doing its thing.\n\n#### JavaScript\n\nThe version where the UI is written in normal JavaScript is [here](http://www.atmat.net/transliterate/test/JsTest.html).\n\n#### GHCi\n\n```\n$ cabal repl\nλ\u003e :set -XOverloadedStrings\nλ\u003e putStrLn . unpack $ toHangeul \"an nyeong\"\n안녕\nλ\u003e putStrLn . unpack $ fromHangeul \"하스켈\"\nha seu kel\n```\n\n\n## Implementation\n\nThe main module is [Translit.Hangeul](src/Translit/Hangeul.hs), it's shared between GHC and Fay. There are GHC and Fay specific modules for some low level functionality where Fay uses the FFI and GHC the text and pcre packages.\n\nThe UI for browsers has two implementations, one in [Fay](test/FayTest.hs) and one in [JavaScript](test/JsTest.js). There's also a command line test that runs in both [GHCI and nodejs](test/Test.hs). They are short so I'll put them here for comparison:\n\n```javascript\n$(document).ready(function () {\n\n  var H = Strict.Translit.Hangeul;\n\n  var inp = jQuery(\"#inp\");\n  var out = jQuery(\"#out\");\n\n  inp.keyup(function () {\n    out.val(H.toHangeul(inp.val()));\n  });\n  out.keyup(function () {\n    inp.val(H.fromHangeul(out.val()));\n  });\n\n});\n```\n\n```haskell\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE RebindableSyntax  #-}\n\nmodule FayTestWeb where\n\nimport           Fay.Text\nimport           JQuery\nimport           Prelude\nimport           Translit.Hangeul\n\nmain :: Fay ()\nmain = ready $ do\n  inp \u003c- select \"#inp\"\n  out \u003c- select \"#out\"\n\n  (`keyup` inp) $ \\_ -\u003e do\n    t \u003c- getVal inp\n    setVal (toHangeul t) out\n    return ()\n  (`keyup` out) $ \\_ -\u003e do\n    b \u003c- getVal out\n    setVal (fromHangeul b) inp\n    return ()\n```\n\n## Future Plans\n\nI also want to add transliteration for the japanese featural alphabets hiragana and katakana, and maybe others. Japanese kanji is of course not possible to do like this, it needs a dictionary.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergmark%2Ftransliterate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbergmark%2Ftransliterate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergmark%2Ftransliterate/lists"}