Skip to content

Instantly share code, notes, and snippets.

@lasta
Created February 24, 2019 07:04
Show Gist options
  • Save lasta/9e4456c85d2c1fd82723618ad0ae79c4 to your computer and use it in GitHub Desktop.
Save lasta/9e4456c85d2c1fd82723618ad0ae79c4 to your computer and use it in GitHub Desktop.
Hepburn romanization to Katakana map.
val ROMAN_TO_KANA = mapOf(
"a" to "ア", "i" to "イ", "u" to "ウ", "e" to "エ", "o" to "オ",
"la" to "ァ", "li" to "ィ", "lu" to "ゥ", "le" to "ェ", "lo" to "ォ",
"xa" to "ァ", "xi" to "ィ", "xu" to "ゥ", "xe" to "ェ", "xo" to "ォ",
"ka" to "カ", "ki" to "キ", "ku" to "ク", "ke" to "ケ", "ko" to "コ",
"kya" to "キャ", "kyi" to "キィ", "kyu" to "キュ", "kye" to "キェ", "kyo" to "キョ",
"kwa" to "クァ", "kwi" to "クィ", "kwu" to "クゥ", "kwe" to "クェ", "kwo" to "クォ",
"qa" to "カ", "qi" to "キ", "qu" to "ク", "qe" to "ケ", "qo" to "コ",
"qwa" to "クァ", "qwi" to "クィ", "qwu" to "クゥ", "qwe" to "クェ", "qwo" to "クォ",
"ca" to "カ", "ci" to "シ", "cu" to "ク", "ce" to "セ", "co" to "コ",
"ga" to "ガ", "gi" to "ギ", "gu" to "グ", "ge" to "ゲ", "go" to "ゴ",
"gya" to "ギャ", "gyi" to "ギィ", "gyu" to "ギュ", "gye" to "ギェ", "gyo" to "ギョ",
"gwa" to "グァ", "gwi" to "グィ", "gwu" to "グゥ", "gwe" to "グェ", "gwo" to "グォ",
"sa" to "サ", "si" to "シ", "su" to "ス", "se" to "セ", "so" to "ソ",
"sha" to "シャ", "shi" to "シ", "shu" to "シュ", "she" to "シェ", "sho" to "ショ",
"sya" to "シャ", "syi" to "シ", "syu" to "シュ", "sye" to "シェ", "syo" to "ショ",
"za" to "ザ", "zi" to "ジ", "zu" to "ズ", "ze" to "ゼ", "zo" to "ゾ",
"ja" to "ジャ", "ji" to "ジ", "ju" to "ジュ", "je" to "ジェ", "jo" to "ジョ",
"zya" to "ジャ", "zyi" to "ジ", "zyu" to "ジュ", "zye" to "ジェ", "zyo" to "ジョ",
"ta" to "タ", "ti" to "チ", "tu" to "ツ", "te" to "テ", "to" to "ト",
"cha" to "チャ", "chi" to "チ", "chu" to "チュ", "che" to "チェ", "cho" to "チョ",
"tsa" to "ツァ", "tsi" to "ツィ", "tsu" to "ツ", "tse" to "ツェ", "tso" to "ツォ",
"tya" to "チャ", "tyi" to "チ", "tyu" to "チュ", "tye" to "チェ", "tyo" to "チョ",
"tha" to "テァ", "thi" to "ティ", "thu" to "テゥ", "the" to "テェ", "tho" to "テォ",
"twa" to "トァ", "twi" to "トィ", "twu" to "トゥ", "twe" to "トェ", "two" to "トォ",
"da" to "ダ", "di" to "ヂ", "du" to "ヅ", "de" to "デ", "do" to "ド",
"dya" to "ヂャ", "dyi" to "ヂィ", "dyu" to "ヂュ", "dye" to "ヂェ", "dyo" to "ヂョ",
"dha" to "デャ", "dhi" to "ディ", "dhu" to "デュ", "dhe" to "デェ", "dho" to "デョ",
"dwa" to "ドァ", "dwi" to "ドィ", "dwu" to "ドゥ", "dwe" to "ドェ", "dwo" to "ドォ",
"na" to "ナ", "ni" to "ニ", "nu" to "ヌ", "ne" to "ネ", "no" to "ノ",
"nya" to "ニャ", "nyi" to "ニィ", "nyu" to "ニュ", "nye" to "ニェ", "nyo" to "ニョ",
"ha" to "ハ", "hi" to "ヒ", "hu" to "フ", "he" to "ヘ", "ho" to "ホ",
"hya" to "ヒャ", "hyi" to "ヒィ", "hyu" to "ヒュ", "hye" to "ヒェ", "hyo" to "ヒョ",
"ba" to "バ", "bi" to "ビ", "bu" to "ブ", "be" to "ベ", "bo" to "ボ",
"bya" to "ビャ", "byi" to "ビィ", "byu" to "ビュ", "bye" to "ビェ", "byo" to "ビョ",
"pa" to "パ", "pi" to "ピ", "pu" to "プ", "pe" to "ペ", "po" to "ポ",
"pya" to "ピャ", "pyi" to "ピィ", "pyu" to "ピュ", "pye" to "ピェ", "pyo" to "ピョ",
"fa" to "ファ", "fi" to "フィ", "fu" to "フ", "fe" to "フェ", "fo" to "フォ",
"fya" to "ファ", "fyi" to "フィ", "fyu" to "フ", "fye" to "フェ", "fyo" to "フォ",
"ma" to "マ", "mi" to "ミ", "mu" to "ム", "me" to "メ", "mo" to "モ",
"mya" to "ミャ", "myi" to "ミィ", "myu" to "ミュ", "mye" to "ミェ", "myo" to "ミョ",
"ya" to "ヤ", "yi" to "イ", "yu" to "ユ", "ye" to "エ", "yo" to "ヨ",
"lya" to "ャ", "lyi" to "ィ", "lyu" to "ュ", "lye" to "ェ", "lyo" to "ョ",
"xya" to "ャ", "xyi" to "ィ", "xyu" to "ュ", "xye" to "ェ", "xyo" to "ョ",
"ra" to "ラ", "ri" to "リ", "ru" to "ル", "re" to "レ", "ro" to "ロ",
"rya" to "リャ", "ryi" to "リィ", "ryu" to "リュ", "rye" to "リェ", "ryo" to "リョ",
"wa" to "ワ", "wi" to "ウィ", "wu" to "ウ", "we" to "ウェ", "wo" to "ヲ",
"va" to "ヴァ", "vi" to "ヴィ", "vu" to "ヴ", "ve" to "ヴェ", "vo" to "ヴォ",
"lla" to "ッァ", "lli" to "ッィ", "llu" to "ッゥ", "lle" to "ッェ", "llo" to "ッォ",
"xxa" to "ッァ", "xxi" to "ッィ", "xxu" to "ッゥ", "xxe" to "ッェ", "xxo" to "ッォ",
"kka" to "ッカ", "kki" to "ッキ", "kku" to "ック", "kke" to "ッケ", "kko" to "ッコ",
"kkya" to "ッキャ", "kkyi" to "ッキィ", "kkyu" to "ッキュ", "kkye" to "ッキェ", "kkyo" to "ッキョ",
"kkwa" to "ックァ", "kkwi" to "ックィ", "kkwu" to "ックゥ", "kkwe" to "ックェ", "kkwo" to "ックォ",
"qqa" to "ックァ", "qqi" to "ックィ", "qqu" to "ック", "qqe" to "ックェ", "qqo" to "ックォ",
"qqwa" to "ックァ", "qqwi" to "ックィ", "qqwu" to "ック", "qqwe" to "ックェ", "qqwo" to "ックォ",
"cca" to "ッカ", "cci" to "ッシ", "ccu" to "ック", "cce" to "ッセ", "cco" to "ッコ",
"gga" to "ッガ", "ggi" to "ッギ", "ggu" to "ッグ", "gge" to "ッゲ", "ggo" to "ッゴ",
"ggya" to "ッギャ", "ggyi" to "ッギィ", "ggyu" to "ッギュ", "ggye" to "ッギェ", "ggyo" to "ッギョ",
"ggwa" to "ッグァ", "ggwi" to "ッグィ", "ggwu" to "ッグゥ", "ggwe" to "ッグェ", "ggwo" to "ッグォ",
"ssa" to "ッサ", "ssi" to "ッシ", "ssu" to "ッス", "sse" to "ッセ", "sso" to "ッソ",
"ssha" to "ッシャ", "sshi" to "ッシ", "sshu" to "ッシュ", "sshe" to "ッシェ", "ssho" to "ッショ",
"ssya" to "ッシャ", "ssyi" to "ッシィ", "ssyu" to "ッシュ", "ssye" to "ッシェ", "ssyo" to "ッショ",
"zza" to "ッザ", "zzi" to "ッゼィ", "zzu" to "ッズ", "zze" to "ッゼ", "zzo" to "ッゾ",
"jja" to "ッジャ", "jji" to "ッジ", "jju" to "ッジュ", "jje" to "ッジェ", "jjo" to "ッジョ",
"zzya" to "ッジャ", "zzyi" to "ッジィ", "zzyu" to "ッジュ", "zzye" to "ッジェ", "zzyo" to "ッジョ",
"tta" to "ッタ", "tti" to "ッチ", "ttu" to "ッツ", "tte" to "ッテ", "tto" to "ット",
"ccha" to "ッチャ", "cchi" to "ッチ", "cchu" to "ッチュ", "cche" to "ッチェ", "ccho" to "ッチョ",
"ttsa" to "ッツァ", "ttsi" to "ッツィ", "ttsu" to "ッツ", "ttse" to "ッツェ", "ttso" to "ッツォ",
"ttya" to "ッチャ", "ttyi" to "ッチィ", "ttyu" to "ッチュ", "ttye" to "ッチェ", "ttyo" to "ッチョ",
"ttha" to "ッテャ", "tthi" to "ッティ", "tthu" to "ッテュ", "tthe" to "ッテェ", "ttho" to "ッテョ",
"ttwa" to "ットァ", "ttwi" to "ットィ", "ttwu" to "ットゥ", "ttwe" to "ットェ", "ttwo" to "ットォ",
"dda" to "ッダ", "ddi" to "ッディ", "ddu" to "ッデゥ", "dde" to "ッデ", "ddo" to "ッド",
"ddya" to "ッヂャ", "ddyi" to "ッヂィ", "ddyu" to "ッヂュ", "ddye" to "ッヂェ", "ddyo" to "ッヂョ",
"ddha" to "ッデャ", "ddhi" to "ッディ", "ddhu" to "ッデュ", "ddhe" to "ッデェ", "ddho" to "ッデョ",
"ddwa" to "ッドァ", "ddwi" to "ッドィ", "ddwu" to "ッドゥ", "ddwe" to "ッドェ", "ddwo" to "ッドォ",
"hha" to "ッハ", "hhi" to "ッヒ", "hhu" to "ッフ", "hhe" to "ッヘ", "hho" to "ッホ",
"hhya" to "ッヒャ", "hhyi" to "ッヒィ", "hhyu" to "ッヒュ", "hhye" to "ッヒェ", "hhyo" to "ッヒョ",
"bba" to "ッバ", "bbi" to "ッビ", "bbu" to "ッブ", "bbe" to "ッベ", "bbo" to "ッボ",
"bbya" to "ッビャ", "bbyi" to "ッビィ", "bbyu" to "ッビュ", "bbye" to "ッビェ", "bbyo" to "ッビョ",
"ppa" to "ッパ", "ppi" to "ッピ", "ppu" to "ップ", "ppe" to "ッペ", "ppo" to "ッポ",
"ppya" to "ッピャ", "ppyi" to "ッピィ", "ppyu" to "ッピュ", "ppye" to "ッピェ", "ppyo" to "ッピョ",
"ffa" to "ッファ", "ffi" to "ッフィ", "ffu" to "ッフ", "ffe" to "ッフェ", "ffo" to "ッフォ",
"ffya" to "ッフャ", "ffyi" to "ッフィ", "ffyu" to "ッフュ", "ffye" to "ッフェ", "ffyo" to "ッフョ",
"mma" to "ッマ", "mmi" to "ッミ", "mmu" to "ッム", "mme" to "ッメ", "mmo" to "ッモ",
"mmya" to "ッミャ", "mmyi" to "ッミィ", "mmyu" to "ッミュ", "mmye" to "ッミェ", "mmyo" to "ッミョ",
"yya" to "ッヤ", "yyi" to "ッイ", "yyu" to "ッユ", "yye" to "ッエ", "yyo" to "ッヨ",
"llya" to "ッャ", "llyi" to "ッィ", "llyu" to "ッュ", "llye" to "ッェ", "llyo" to "ッョ",
"xxya" to "ッャ", "xxyi" to "ッィ", "xxyu" to "ッュ", "xxye" to "ッェ", "xxyo" to "ッョ",
"rra" to "ッラ", "rri" to "ッリ", "rru" to "ッル", "rre" to "ッレ", "rro" to "ッロ",
"rrya" to "ッリャ", "rryi" to "ッリィ", "rryu" to "ッリュ", "rrye" to "ッリェ", "rryo" to "ッリョ",
"wwa" to "ッワ", "wwi" to "ッウィ", "wwu" to "ッウ", "wwe" to "ッウェ", "wwo" to "ッヲ",
"vva" to "ッヴァ", "vvi" to "ッヴィ", "vvu" to "ッヴ", "vve" to "ッヴェ", "vvo" to "ッヴォ",
"ltu" to "ッ",
"xtu" to "ッ",
"nn" to "ン"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment