romanization.php 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509
  1. <?php
  2. /**
  3. * Romanization lookup table
  4. *
  5. * This lookup tables provides a way to transform strings written in a language
  6. * different from the ones based upon latin letters into plain ASCII.
  7. *
  8. * Please note: this is not a scientific transliteration table. It only works
  9. * oneway from nonlatin to ASCII and it works by simple character replacement
  10. * only. Specialities of each language are not supported.
  11. *
  12. * @todo some keys are used multiple times
  13. * @todo remove or integrate commented pairs
  14. *
  15. * @author Andreas Gohr <andi@splitbrain.org>
  16. * @author Vitaly Blokhin <vitinfo@vitn.com>
  17. * @author Bisqwit <bisqwit@iki.fi>
  18. * @author Arthit Suriyawongkul <arthit@gmail.com>
  19. * @author Denis Scheither <amorphis@uni-bremen.de>
  20. * @author Eivind Morland <eivind.morland@gmail.com>
  21. * @link http://www.uconv.com/translit.htm
  22. * @link http://kanjidict.stc.cx/hiragana.php?src=2
  23. * @link http://www.translatum.gr/converter/greek-transliteration.htm
  24. * @link http://en.wikipedia.org/wiki/Royal_Thai_General_System_of_Transcription
  25. * @link http://www.btranslations.com/resources/romanization/korean.asp
  26. */
  27. return [
  28. // scandinavian - differs from what we do in deaccent
  29. 'å' => 'a',
  30. 'Å' => 'A',
  31. 'ä' => 'a',
  32. 'Ä' => 'A',
  33. 'ö' => 'o',
  34. 'Ö' => 'O',
  35. //russian cyrillic
  36. 'а' => 'a',
  37. 'А' => 'A',
  38. 'б' => 'b',
  39. 'Б' => 'B',
  40. 'в' => 'v',
  41. 'В' => 'V',
  42. 'г' => 'g',
  43. 'Г' => 'G',
  44. 'д' => 'd',
  45. 'Д' => 'D',
  46. 'е' => 'e',
  47. 'Е' => 'E',
  48. 'ё' => 'jo',
  49. 'Ё' => 'Jo',
  50. 'ж' => 'zh',
  51. 'Ж' => 'Zh',
  52. 'з' => 'z',
  53. 'З' => 'Z',
  54. 'и' => 'i',
  55. 'И' => 'I',
  56. 'й' => 'j',
  57. 'Й' => 'J',
  58. 'к' => 'k',
  59. 'К' => 'K',
  60. 'л' => 'l',
  61. 'Л' => 'L',
  62. 'м' => 'm',
  63. 'М' => 'M',
  64. 'н' => 'n',
  65. 'Н' => 'N',
  66. 'о' => 'o',
  67. 'О' => 'O',
  68. 'п' => 'p',
  69. 'П' => 'P',
  70. 'р' => 'r',
  71. 'Р' => 'R',
  72. 'с' => 's',
  73. 'С' => 'S',
  74. 'т' => 't',
  75. 'Т' => 'T',
  76. 'у' => 'u',
  77. 'У' => 'U',
  78. 'ф' => 'f',
  79. 'Ф' => 'F',
  80. 'х' => 'x',
  81. 'Х' => 'X',
  82. 'ц' => 'c',
  83. 'Ц' => 'C',
  84. 'ч' => 'ch',
  85. 'Ч' => 'Ch',
  86. 'ш' => 'sh',
  87. 'Ш' => 'Sh',
  88. 'щ' => 'sch',
  89. 'Щ' => 'Sch',
  90. 'ъ' => '',
  91. 'Ъ' => '',
  92. 'ы' => 'y',
  93. 'Ы' => 'Y',
  94. 'ь' => '',
  95. 'Ь' => '',
  96. 'э' => 'eh',
  97. 'Э' => 'Eh',
  98. 'ю' => 'ju',
  99. 'Ю' => 'Ju',
  100. 'я' => 'ja',
  101. 'Я' => 'Ja',
  102. // Ukrainian cyrillic
  103. 'Ґ' => 'Gh',
  104. 'ґ' => 'gh',
  105. 'Є' => 'Je',
  106. 'є' => 'je',
  107. 'І' => 'I',
  108. 'і' => 'i',
  109. 'Ї' => 'Ji',
  110. 'ї' => 'ji',
  111. // Georgian
  112. 'ა' => 'a',
  113. 'ბ' => 'b',
  114. 'გ' => 'g',
  115. 'დ' => 'd',
  116. 'ე' => 'e',
  117. 'ვ' => 'v',
  118. 'ზ' => 'z',
  119. 'თ' => 'th',
  120. 'ი' => 'i',
  121. 'კ' => 'p',
  122. 'ლ' => 'l',
  123. 'მ' => 'm',
  124. 'ნ' => 'n',
  125. 'ო' => 'o',
  126. 'პ' => 'p',
  127. 'ჟ' => 'zh',
  128. 'რ' => 'r',
  129. 'ს' => 's',
  130. 'ტ' => 't',
  131. 'უ' => 'u',
  132. 'ფ' => 'ph',
  133. 'ქ' => 'kh',
  134. 'ღ' => 'gh',
  135. 'ყ' => 'q',
  136. 'შ' => 'sh',
  137. 'ჩ' => 'ch',
  138. 'ც' => 'c',
  139. 'ძ' => 'dh',
  140. 'წ' => 'w',
  141. 'ჭ' => 'j',
  142. 'ხ' => 'x',
  143. 'ჯ' => 'jh',
  144. 'ჰ' => 'xh',
  145. //Sanskrit
  146. 'अ' => 'a',
  147. 'आ' => 'ah',
  148. 'इ' => 'i',
  149. 'ई' => 'ih',
  150. 'उ' => 'u',
  151. 'ऊ' => 'uh',
  152. 'ऋ' => 'ry',
  153. 'ॠ' => 'ryh',
  154. 'ऌ' => 'ly',
  155. 'ॡ' => 'lyh',
  156. 'ए' => 'e',
  157. 'ऐ' => 'ay',
  158. 'ओ' => 'o',
  159. 'औ' => 'aw',
  160. 'अं' => 'amh',
  161. 'अः' => 'aq',
  162. 'क' => 'k',
  163. 'ख' => 'kh',
  164. 'ग' => 'g',
  165. 'घ' => 'gh',
  166. 'ङ' => 'nh',
  167. 'च' => 'c',
  168. 'छ' => 'ch',
  169. 'ज' => 'j',
  170. 'झ' => 'jh',
  171. 'ञ' => 'ny',
  172. 'ट' => 'tq',
  173. 'ठ' => 'tqh',
  174. 'ड' => 'dq',
  175. 'ढ' => 'dqh',
  176. 'ण' => 'nq',
  177. 'त' => 't',
  178. 'थ' => 'th',
  179. 'द' => 'd',
  180. 'ध' => 'dh',
  181. 'न' => 'n',
  182. 'प' => 'p',
  183. 'फ' => 'ph',
  184. 'ब' => 'b',
  185. 'भ' => 'bh',
  186. 'म' => 'm',
  187. 'य' => 'z',
  188. 'र' => 'r',
  189. 'ल' => 'l',
  190. 'व' => 'v',
  191. 'श' => 'sh',
  192. 'ष' => 'sqh',
  193. 'स' => 's',
  194. 'ह' => 'x',
  195. //Sanskrit diacritics
  196. 'Ā' => 'A',
  197. 'Ī' => 'I',
  198. 'Ū' => 'U',
  199. 'Ṛ' => 'R',
  200. 'Ṝ' => 'R',
  201. 'Ṅ' => 'N',
  202. 'Ñ' => 'N',
  203. 'Ṭ' => 'T',
  204. 'Ḍ' => 'D',
  205. 'Ṇ' => 'N',
  206. 'Ś' => 'S',
  207. 'Ṣ' => 'S',
  208. 'Ṁ' => 'M',
  209. 'Ṃ' => 'M',
  210. 'Ḥ' => 'H',
  211. 'Ḷ' => 'L',
  212. 'Ḹ' => 'L',
  213. 'ā' => 'a',
  214. 'ī' => 'i',
  215. 'ū' => 'u',
  216. 'ṛ' => 'r',
  217. 'ṝ' => 'r',
  218. 'ṅ' => 'n',
  219. 'ñ' => 'n',
  220. 'ṭ' => 't',
  221. 'ḍ' => 'd',
  222. 'ṇ' => 'n',
  223. 'ś' => 's',
  224. 'ṣ' => 's',
  225. 'ṁ' => 'm',
  226. 'ṃ' => 'm',
  227. 'ḥ' => 'h',
  228. 'ḷ' => 'l',
  229. 'ḹ' => 'l',
  230. //Hebrew
  231. 'א' => 'a',
  232. 'ב' => 'b',
  233. 'ג' => 'g',
  234. 'ד' => 'd',
  235. 'ה' => 'h',
  236. 'ו' => 'v',
  237. 'ז' => 'z',
  238. 'ח' => 'kh',
  239. 'ט' => 'th',
  240. 'י' => 'y',
  241. 'ך' => 'h',
  242. 'כ' => 'k',
  243. 'ל' => 'l',
  244. 'ם' => 'm',
  245. 'מ' => 'm',
  246. 'ן' => 'n',
  247. 'נ' => 'n',
  248. 'ס' => 's',
  249. 'ע' => 'ah',
  250. 'ף' => 'f',
  251. 'פ' => 'p',
  252. 'ץ' => 'c',
  253. 'צ' => 'c',
  254. 'ק' => 'q',
  255. 'ר' => 'r',
  256. 'ש' => 'sh',
  257. 'ת' => 't',
  258. //Arabic
  259. 'ا' => 'a',
  260. 'ب' => 'b',
  261. 'ت' => 't',
  262. 'ث' => 'th',
  263. 'ج' => 'g',
  264. 'ح' => 'xh',
  265. 'خ' => 'x',
  266. 'د' => 'd',
  267. 'ذ' => 'dh',
  268. 'ر' => 'r',
  269. 'ز' => 'z',
  270. 'س' => 's',
  271. 'ش' => 'sh',
  272. 'ص' => 's\'',
  273. 'ض' => 'd\'',
  274. 'ط' => 't\'',
  275. 'ظ' => 'z\'',
  276. 'ع' => 'y',
  277. 'غ' => 'gh',
  278. 'ف' => 'f',
  279. 'ق' => 'q',
  280. 'ك' => 'k',
  281. 'ل' => 'l',
  282. 'م' => 'm',
  283. 'ن' => 'n',
  284. 'ه' => 'x\'',
  285. 'و' => 'u',
  286. 'ي' => 'i',
  287. // Japanese characters (last update: 2008-05-09)
  288. // Japanese hiragana
  289. // 3 character syllables, っ doubles the consonant after
  290. 'っちゃ' => 'ccha',
  291. 'っちぇ' => 'cche',
  292. 'っちょ' => 'ccho',
  293. 'っちゅ' => 'cchu',
  294. 'っびゃ' => 'bbya',
  295. 'っびぇ' => 'bbye',
  296. 'っびぃ' => 'bbyi',
  297. 'っびょ' => 'bbyo',
  298. 'っびゅ' => 'bbyu',
  299. 'っぴゃ' => 'ppya',
  300. 'っぴぇ' => 'ppye',
  301. 'っぴぃ' => 'ppyi',
  302. 'っぴょ' => 'ppyo',
  303. 'っぴゅ' => 'ppyu',
  304. 'っちゃ' => 'ccha',
  305. 'っちぇ' => 'cche',
  306. 'っち' => 'cchi',
  307. 'っちょ' => 'ccho',
  308. 'っちゅ' => 'cchu',
  309. // 'っひゃ'=>'hya',
  310. // 'っひぇ'=>'hye',
  311. // 'っひぃ'=>'hyi',
  312. // 'っひょ'=>'hyo',
  313. // 'っひゅ'=>'hyu',
  314. 'っきゃ' => 'kkya',
  315. 'っきぇ' => 'kkye',
  316. 'っきぃ' => 'kkyi',
  317. 'っきょ' => 'kkyo',
  318. 'っきゅ' => 'kkyu',
  319. 'っぎゃ' => 'ggya',
  320. 'っぎぇ' => 'ggye',
  321. 'っぎぃ' => 'ggyi',
  322. 'っぎょ' => 'ggyo',
  323. 'っぎゅ' => 'ggyu',
  324. 'っみゃ' => 'mmya',
  325. 'っみぇ' => 'mmye',
  326. 'っみぃ' => 'mmyi',
  327. 'っみょ' => 'mmyo',
  328. 'っみゅ' => 'mmyu',
  329. 'っにゃ' => 'nnya',
  330. 'っにぇ' => 'nnye',
  331. 'っにぃ' => 'nnyi',
  332. 'っにょ' => 'nnyo',
  333. 'っにゅ' => 'nnyu',
  334. 'っりゃ' => 'rrya',
  335. 'っりぇ' => 'rrye',
  336. 'っりぃ' => 'rryi',
  337. 'っりょ' => 'rryo',
  338. 'っりゅ' => 'rryu',
  339. 'っしゃ' => 'ssha',
  340. 'っしぇ' => 'sshe',
  341. 'っし' => 'sshi',
  342. 'っしょ' => 'ssho',
  343. 'っしゅ' => 'sshu',
  344. // seperate hiragana 'n' ('n' + 'i' != 'ni', normally we would write "kon'nichi wa" but the
  345. // apostrophe would be converted to _ anyway)
  346. 'んあ' => 'n_a',
  347. 'んえ' => 'n_e',
  348. 'んい' => 'n_i',
  349. 'んお' => 'n_o',
  350. 'んう' => 'n_u',
  351. 'んや' => 'n_ya',
  352. 'んよ' => 'n_yo',
  353. 'んゆ' => 'n_yu',
  354. // 2 character syllables - normal
  355. 'ふぁ' => 'fa',
  356. 'ふぇ' => 'fe',
  357. 'ふぃ' => 'fi',
  358. 'ふぉ' => 'fo',
  359. 'ちゃ' => 'cha',
  360. 'ちぇ' => 'che',
  361. 'ち' => 'chi',
  362. 'ちょ' => 'cho',
  363. 'ちゅ' => 'chu',
  364. 'ひゃ' => 'hya',
  365. 'ひぇ' => 'hye',
  366. 'ひぃ' => 'hyi',
  367. 'ひょ' => 'hyo',
  368. 'ひゅ' => 'hyu',
  369. 'びゃ' => 'bya',
  370. 'びぇ' => 'bye',
  371. 'びぃ' => 'byi',
  372. 'びょ' => 'byo',
  373. 'びゅ' => 'byu',
  374. 'ぴゃ' => 'pya',
  375. 'ぴぇ' => 'pye',
  376. 'ぴぃ' => 'pyi',
  377. 'ぴょ' => 'pyo',
  378. 'ぴゅ' => 'pyu',
  379. 'きゃ' => 'kya',
  380. 'きぇ' => 'kye',
  381. 'きぃ' => 'kyi',
  382. 'きょ' => 'kyo',
  383. 'きゅ' => 'kyu',
  384. 'ぎゃ' => 'gya',
  385. 'ぎぇ' => 'gye',
  386. 'ぎぃ' => 'gyi',
  387. 'ぎょ' => 'gyo',
  388. 'ぎゅ' => 'gyu',
  389. 'みゃ' => 'mya',
  390. 'みぇ' => 'mye',
  391. 'みぃ' => 'myi',
  392. 'みょ' => 'myo',
  393. 'みゅ' => 'myu',
  394. 'にゃ' => 'nya',
  395. 'にぇ' => 'nye',
  396. 'にぃ' => 'nyi',
  397. 'にょ' => 'nyo',
  398. 'にゅ' => 'nyu',
  399. 'りゃ' => 'rya',
  400. 'りぇ' => 'rye',
  401. 'りぃ' => 'ryi',
  402. 'りょ' => 'ryo',
  403. 'りゅ' => 'ryu',
  404. 'しゃ' => 'sha',
  405. 'しぇ' => 'she',
  406. 'し' => 'shi',
  407. 'しょ' => 'sho',
  408. 'しゅ' => 'shu',
  409. 'じゃ' => 'ja',
  410. 'じぇ' => 'je',
  411. 'じょ' => 'jo',
  412. 'じゅ' => 'ju',
  413. 'うぇ' => 'we',
  414. 'うぃ' => 'wi',
  415. 'いぇ' => 'ye',
  416. // 2 character syllables, っ doubles the consonant after
  417. 'っば' => 'bba',
  418. 'っべ' => 'bbe',
  419. 'っび' => 'bbi',
  420. 'っぼ' => 'bbo',
  421. 'っぶ' => 'bbu',
  422. 'っぱ' => 'ppa',
  423. 'っぺ' => 'ppe',
  424. 'っぴ' => 'ppi',
  425. 'っぽ' => 'ppo',
  426. 'っぷ' => 'ppu',
  427. 'った' => 'tta',
  428. 'って' => 'tte',
  429. 'っち' => 'cchi',
  430. 'っと' => 'tto',
  431. 'っつ' => 'ttsu',
  432. 'っだ' => 'dda',
  433. 'っで' => 'dde',
  434. 'っぢ' => 'ddi',
  435. 'っど' => 'ddo',
  436. 'っづ' => 'ddu',
  437. 'っが' => 'gga',
  438. 'っげ' => 'gge',
  439. 'っぎ' => 'ggi',
  440. 'っご' => 'ggo',
  441. 'っぐ' => 'ggu',
  442. 'っか' => 'kka',
  443. 'っけ' => 'kke',
  444. 'っき' => 'kki',
  445. 'っこ' => 'kko',
  446. 'っく' => 'kku',
  447. 'っま' => 'mma',
  448. 'っめ' => 'mme',
  449. 'っみ' => 'mmi',
  450. 'っも' => 'mmo',
  451. 'っむ' => 'mmu',
  452. 'っな' => 'nna',
  453. 'っね' => 'nne',
  454. 'っに' => 'nni',
  455. 'っの' => 'nno',
  456. 'っぬ' => 'nnu',
  457. 'っら' => 'rra',
  458. 'っれ' => 'rre',
  459. 'っり' => 'rri',
  460. 'っろ' => 'rro',
  461. 'っる' => 'rru',
  462. 'っさ' => 'ssa',
  463. 'っせ' => 'sse',
  464. 'っし' => 'sshi',
  465. 'っそ' => 'sso',
  466. 'っす' => 'ssu',
  467. 'っざ' => 'zza',
  468. 'っぜ' => 'zze',
  469. 'っじ' => 'jji',
  470. 'っぞ' => 'zzo',
  471. 'っず' => 'zzu',
  472. // 1 character syllabels
  473. 'あ' => 'a',
  474. 'え' => 'e',
  475. 'い' => 'i',
  476. 'お' => 'o',
  477. 'う' => 'u',
  478. 'ん' => 'n',
  479. 'は' => 'ha',
  480. 'へ' => 'he',
  481. 'ひ' => 'hi',
  482. 'ほ' => 'ho',
  483. 'ふ' => 'fu',
  484. 'ば' => 'ba',
  485. 'べ' => 'be',
  486. 'び' => 'bi',
  487. 'ぼ' => 'bo',
  488. 'ぶ' => 'bu',
  489. 'ぱ' => 'pa',
  490. 'ぺ' => 'pe',
  491. 'ぴ' => 'pi',
  492. 'ぽ' => 'po',
  493. 'ぷ' => 'pu',
  494. 'た' => 'ta',
  495. 'て' => 'te',
  496. 'ち' => 'chi',
  497. 'と' => 'to',
  498. 'つ' => 'tsu',
  499. 'だ' => 'da',
  500. 'で' => 'de',
  501. 'ぢ' => 'di',
  502. 'ど' => 'do',
  503. 'づ' => 'du',
  504. 'が' => 'ga',
  505. 'げ' => 'ge',
  506. 'ぎ' => 'gi',
  507. 'ご' => 'go',
  508. 'ぐ' => 'gu',
  509. 'か' => 'ka',
  510. 'け' => 'ke',
  511. 'き' => 'ki',
  512. 'こ' => 'ko',
  513. 'く' => 'ku',
  514. 'ま' => 'ma',
  515. 'め' => 'me',
  516. 'み' => 'mi',
  517. 'も' => 'mo',
  518. 'む' => 'mu',
  519. 'な' => 'na',
  520. 'ね' => 'ne',
  521. 'に' => 'ni',
  522. 'の' => 'no',
  523. 'ぬ' => 'nu',
  524. 'ら' => 'ra',
  525. 'れ' => 're',
  526. 'り' => 'ri',
  527. 'ろ' => 'ro',
  528. 'る' => 'ru',
  529. 'さ' => 'sa',
  530. 'せ' => 'se',
  531. 'し' => 'shi',
  532. 'そ' => 'so',
  533. 'す' => 'su',
  534. 'わ' => 'wa',
  535. 'を' => 'wo',
  536. 'ざ' => 'za',
  537. 'ぜ' => 'ze',
  538. 'じ' => 'ji',
  539. 'ぞ' => 'zo',
  540. 'ず' => 'zu',
  541. 'や' => 'ya',
  542. 'よ' => 'yo',
  543. 'ゆ' => 'yu',
  544. // old characters
  545. 'ゑ' => 'we',
  546. 'ゐ' => 'wi',
  547. // convert what's left (probably only kicks in when something's missing above)
  548. // 'ぁ'=>'a','ぇ'=>'e','ぃ'=>'i','ぉ'=>'o','ぅ'=>'u',
  549. // 'ゃ'=>'ya','ょ'=>'yo','ゅ'=>'yu',
  550. // never seen one of those (disabled for the moment)
  551. // 'ヴぁ'=>'va','ヴぇ'=>'ve','ヴぃ'=>'vi','ヴぉ'=>'vo','ヴ'=>'vu',
  552. // 'でゃ'=>'dha','でぇ'=>'dhe','でぃ'=>'dhi','でょ'=>'dho','でゅ'=>'dhu',
  553. // 'どぁ'=>'dwa','どぇ'=>'dwe','どぃ'=>'dwi','どぉ'=>'dwo','どぅ'=>'dwu',
  554. // 'ぢゃ'=>'dya','ぢぇ'=>'dye','ぢぃ'=>'dyi','ぢょ'=>'dyo','ぢゅ'=>'dyu',
  555. // 'ふぁ'=>'fwa','ふぇ'=>'fwe','ふぃ'=>'fwi','ふぉ'=>'fwo','ふぅ'=>'fwu',
  556. // 'ふゃ'=>'fya','ふぇ'=>'fye','ふぃ'=>'fyi','ふょ'=>'fyo','ふゅ'=>'fyu',
  557. // 'すぁ'=>'swa','すぇ'=>'swe','すぃ'=>'swi','すぉ'=>'swo','すぅ'=>'swu',
  558. // 'てゃ'=>'tha','てぇ'=>'the','てぃ'=>'thi','てょ'=>'tho','てゅ'=>'thu',
  559. // 'つゃ'=>'tsa','つぇ'=>'tse','つぃ'=>'tsi','つょ'=>'tso','つ'=>'tsu',
  560. // 'とぁ'=>'twa','とぇ'=>'twe','とぃ'=>'twi','とぉ'=>'two','とぅ'=>'twu',
  561. // 'ヴゃ'=>'vya','ヴぇ'=>'vye','ヴぃ'=>'vyi','ヴょ'=>'vyo','ヴゅ'=>'vyu',
  562. // 'うぁ'=>'wha','うぇ'=>'whe','うぃ'=>'whi','うぉ'=>'who','うぅ'=>'whu',
  563. // 'じゃ'=>'zha','じぇ'=>'zhe','じぃ'=>'zhi','じょ'=>'zho','じゅ'=>'zhu',
  564. // 'じゃ'=>'zya','じぇ'=>'zye','じぃ'=>'zyi','じょ'=>'zyo','じゅ'=>'zyu',
  565. // 'spare' characters from other romanization systems
  566. // 'だ'=>'da','で'=>'de','ぢ'=>'di','ど'=>'do','づ'=>'du',
  567. // 'ら'=>'la','れ'=>'le','り'=>'li','ろ'=>'lo','る'=>'lu',
  568. // 'さ'=>'sa','せ'=>'se','し'=>'si','そ'=>'so','す'=>'su',
  569. // 'ちゃ'=>'cya','ちぇ'=>'cye','ちぃ'=>'cyi','ちょ'=>'cyo','ちゅ'=>'cyu',
  570. //'じゃ'=>'jya','じぇ'=>'jye','じぃ'=>'jyi','じょ'=>'jyo','じゅ'=>'jyu',
  571. //'りゃ'=>'lya','りぇ'=>'lye','りぃ'=>'lyi','りょ'=>'lyo','りゅ'=>'lyu',
  572. //'しゃ'=>'sya','しぇ'=>'sye','しぃ'=>'syi','しょ'=>'syo','しゅ'=>'syu',
  573. //'ちゃ'=>'tya','ちぇ'=>'tye','ちぃ'=>'tyi','ちょ'=>'tyo','ちゅ'=>'tyu',
  574. //'し'=>'ci',,い'=>'yi','ぢ'=>'dzi',
  575. //'っじゃ'=>'jja','っじぇ'=>'jje','っじ'=>'jji','っじょ'=>'jjo','っじゅ'=>'jju',
  576. // Japanese katakana
  577. // 4 character syllables: ッ doubles the consonant after, ー doubles the vowel before
  578. // (usualy written with macron, but we don't want that in our URLs)
  579. 'ッビャー' => 'bbyaa',
  580. 'ッビェー' => 'bbyee',
  581. 'ッビィー' => 'bbyii',
  582. 'ッビョー' => 'bbyoo',
  583. 'ッビュー' => 'bbyuu',
  584. 'ッピャー' => 'ppyaa',
  585. 'ッピェー' => 'ppyee',
  586. 'ッピィー' => 'ppyii',
  587. 'ッピョー' => 'ppyoo',
  588. 'ッピュー' => 'ppyuu',
  589. 'ッキャー' => 'kkyaa',
  590. 'ッキェー' => 'kkyee',
  591. 'ッキィー' => 'kkyii',
  592. 'ッキョー' => 'kkyoo',
  593. 'ッキュー' => 'kkyuu',
  594. 'ッギャー' => 'ggyaa',
  595. 'ッギェー' => 'ggyee',
  596. 'ッギィー' => 'ggyii',
  597. 'ッギョー' => 'ggyoo',
  598. 'ッギュー' => 'ggyuu',
  599. 'ッミャー' => 'mmyaa',
  600. 'ッミェー' => 'mmyee',
  601. 'ッミィー' => 'mmyii',
  602. 'ッミョー' => 'mmyoo',
  603. 'ッミュー' => 'mmyuu',
  604. 'ッニャー' => 'nnyaa',
  605. 'ッニェー' => 'nnyee',
  606. 'ッニィー' => 'nnyii',
  607. 'ッニョー' => 'nnyoo',
  608. 'ッニュー' => 'nnyuu',
  609. 'ッリャー' => 'rryaa',
  610. 'ッリェー' => 'rryee',
  611. 'ッリィー' => 'rryii',
  612. 'ッリョー' => 'rryoo',
  613. 'ッリュー' => 'rryuu',
  614. 'ッシャー' => 'sshaa',
  615. 'ッシェー' => 'sshee',
  616. 'ッシー' => 'sshii',
  617. 'ッショー' => 'sshoo',
  618. 'ッシュー' => 'sshuu',
  619. 'ッチャー' => 'cchaa',
  620. 'ッチェー' => 'cchee',
  621. 'ッチー' => 'cchii',
  622. 'ッチョー' => 'cchoo',
  623. 'ッチュー' => 'cchuu',
  624. 'ッティー' => 'ttii',
  625. 'ッヂィー' => 'ddii',
  626. // 3 character syllables - doubled vowels
  627. 'ファー' => 'faa',
  628. 'フェー' => 'fee',
  629. 'フィー' => 'fii',
  630. 'フォー' => 'foo',
  631. 'フャー' => 'fyaa',
  632. 'フェー' => 'fyee',
  633. 'フィー' => 'fyii',
  634. 'フョー' => 'fyoo',
  635. 'フュー' => 'fyuu',
  636. 'ヒャー' => 'hyaa',
  637. 'ヒェー' => 'hyee',
  638. 'ヒィー' => 'hyii',
  639. 'ヒョー' => 'hyoo',
  640. 'ヒュー' => 'hyuu',
  641. 'ビャー' => 'byaa',
  642. 'ビェー' => 'byee',
  643. 'ビィー' => 'byii',
  644. 'ビョー' => 'byoo',
  645. 'ビュー' => 'byuu',
  646. 'ピャー' => 'pyaa',
  647. 'ピェー' => 'pyee',
  648. 'ピィー' => 'pyii',
  649. 'ピョー' => 'pyoo',
  650. 'ピュー' => 'pyuu',
  651. 'キャー' => 'kyaa',
  652. 'キェー' => 'kyee',
  653. 'キィー' => 'kyii',
  654. 'キョー' => 'kyoo',
  655. 'キュー' => 'kyuu',
  656. 'ギャー' => 'gyaa',
  657. 'ギェー' => 'gyee',
  658. 'ギィー' => 'gyii',
  659. 'ギョー' => 'gyoo',
  660. 'ギュー' => 'gyuu',
  661. 'ミャー' => 'myaa',
  662. 'ミェー' => 'myee',
  663. 'ミィー' => 'myii',
  664. 'ミョー' => 'myoo',
  665. 'ミュー' => 'myuu',
  666. 'ニャー' => 'nyaa',
  667. 'ニェー' => 'nyee',
  668. 'ニィー' => 'nyii',
  669. 'ニョー' => 'nyoo',
  670. 'ニュー' => 'nyuu',
  671. 'リャー' => 'ryaa',
  672. 'リェー' => 'ryee',
  673. 'リィー' => 'ryii',
  674. 'リョー' => 'ryoo',
  675. 'リュー' => 'ryuu',
  676. 'シャー' => 'shaa',
  677. 'シェー' => 'shee',
  678. 'シー' => 'shii',
  679. 'ショー' => 'shoo',
  680. 'シュー' => 'shuu',
  681. 'ジャー' => 'jaa',
  682. 'ジェー' => 'jee',
  683. 'ジー' => 'jii',
  684. 'ジョー' => 'joo',
  685. 'ジュー' => 'juu',
  686. 'スァー' => 'swaa',
  687. 'スェー' => 'swee',
  688. 'スィー' => 'swii',
  689. 'スォー' => 'swoo',
  690. 'スゥー' => 'swuu',
  691. 'デァー' => 'daa',
  692. 'デェー' => 'dee',
  693. 'ディー' => 'dii',
  694. 'デォー' => 'doo',
  695. 'デゥー' => 'duu',
  696. 'チャー' => 'chaa',
  697. 'チェー' => 'chee',
  698. 'チー' => 'chii',
  699. 'チョー' => 'choo',
  700. 'チュー' => 'chuu',
  701. 'ヂャー' => 'dyaa',
  702. 'ヂェー' => 'dyee',
  703. 'ヂィー' => 'dyii',
  704. 'ヂョー' => 'dyoo',
  705. 'ヂュー' => 'dyuu',
  706. 'ツャー' => 'tsaa',
  707. 'ツェー' => 'tsee',
  708. 'ツィー' => 'tsii',
  709. 'ツョー' => 'tsoo',
  710. 'ツー' => 'tsuu',
  711. 'トァー' => 'twaa',
  712. 'トェー' => 'twee',
  713. 'トィー' => 'twii',
  714. 'トォー' => 'twoo',
  715. 'トゥー' => 'twuu',
  716. 'ドァー' => 'dwaa',
  717. 'ドェー' => 'dwee',
  718. 'ドィー' => 'dwii',
  719. 'ドォー' => 'dwoo',
  720. 'ドゥー' => 'dwuu',
  721. 'ウァー' => 'whaa',
  722. 'ウェー' => 'whee',
  723. 'ウィー' => 'whii',
  724. 'ウォー' => 'whoo',
  725. 'ウゥー' => 'whuu',
  726. 'ヴャー' => 'vyaa',
  727. 'ヴェー' => 'vyee',
  728. 'ヴィー' => 'vyii',
  729. 'ヴョー' => 'vyoo',
  730. 'ヴュー' => 'vyuu',
  731. 'ヴァー' => 'vaa',
  732. 'ヴェー' => 'vee',
  733. 'ヴィー' => 'vii',
  734. 'ヴォー' => 'voo',
  735. 'ヴー' => 'vuu',
  736. 'ウェー' => 'wee',
  737. 'ウィー' => 'wii',
  738. 'イェー' => 'yee',
  739. 'ティー' => 'tii',
  740. 'ヂィー' => 'dii',
  741. // 3 character syllables - doubled consonants
  742. 'ッビャ' => 'bbya',
  743. 'ッビェ' => 'bbye',
  744. 'ッビィ' => 'bbyi',
  745. 'ッビョ' => 'bbyo',
  746. 'ッビュ' => 'bbyu',
  747. 'ッピャ' => 'ppya',
  748. 'ッピェ' => 'ppye',
  749. 'ッピィ' => 'ppyi',
  750. 'ッピョ' => 'ppyo',
  751. 'ッピュ' => 'ppyu',
  752. 'ッキャ' => 'kkya',
  753. 'ッキェ' => 'kkye',
  754. 'ッキィ' => 'kkyi',
  755. 'ッキョ' => 'kkyo',
  756. 'ッキュ' => 'kkyu',
  757. 'ッギャ' => 'ggya',
  758. 'ッギェ' => 'ggye',
  759. 'ッギィ' => 'ggyi',
  760. 'ッギョ' => 'ggyo',
  761. 'ッギュ' => 'ggyu',
  762. 'ッミャ' => 'mmya',
  763. 'ッミェ' => 'mmye',
  764. 'ッミィ' => 'mmyi',
  765. 'ッミョ' => 'mmyo',
  766. 'ッミュ' => 'mmyu',
  767. 'ッニャ' => 'nnya',
  768. 'ッニェ' => 'nnye',
  769. 'ッニィ' => 'nnyi',
  770. 'ッニョ' => 'nnyo',
  771. 'ッニュ' => 'nnyu',
  772. 'ッリャ' => 'rrya',
  773. 'ッリェ' => 'rrye',
  774. 'ッリィ' => 'rryi',
  775. 'ッリョ' => 'rryo',
  776. 'ッリュ' => 'rryu',
  777. 'ッシャ' => 'ssha',
  778. 'ッシェ' => 'sshe',
  779. 'ッシ' => 'sshi',
  780. 'ッショ' => 'ssho',
  781. 'ッシュ' => 'sshu',
  782. 'ッチャ' => 'ccha',
  783. 'ッチェ' => 'cche',
  784. 'ッチ' => 'cchi',
  785. 'ッチョ' => 'ccho',
  786. 'ッチュ' => 'cchu',
  787. 'ッティ' => 'tti',
  788. 'ッヂィ' => 'ddi',
  789. // 3 character syllables - doubled vowel and consonants
  790. 'ッバー' => 'bbaa',
  791. 'ッベー' => 'bbee',
  792. 'ッビー' => 'bbii',
  793. 'ッボー' => 'bboo',
  794. 'ッブー' => 'bbuu',
  795. 'ッパー' => 'ppaa',
  796. 'ッペー' => 'ppee',
  797. 'ッピー' => 'ppii',
  798. 'ッポー' => 'ppoo',
  799. 'ップー' => 'ppuu',
  800. 'ッケー' => 'kkee',
  801. 'ッキー' => 'kkii',
  802. 'ッコー' => 'kkoo',
  803. 'ックー' => 'kkuu',
  804. 'ッカー' => 'kkaa',
  805. 'ッガー' => 'ggaa',
  806. 'ッゲー' => 'ggee',
  807. 'ッギー' => 'ggii',
  808. 'ッゴー' => 'ggoo',
  809. 'ッグー' => 'gguu',
  810. 'ッマー' => 'maa',
  811. 'ッメー' => 'mee',
  812. 'ッミー' => 'mii',
  813. 'ッモー' => 'moo',
  814. 'ッムー' => 'muu',
  815. 'ッナー' => 'nnaa',
  816. 'ッネー' => 'nnee',
  817. 'ッニー' => 'nnii',
  818. 'ッノー' => 'nnoo',
  819. 'ッヌー' => 'nnuu',
  820. 'ッラー' => 'rraa',
  821. 'ッレー' => 'rree',
  822. 'ッリー' => 'rrii',
  823. 'ッロー' => 'rroo',
  824. 'ッルー' => 'rruu',
  825. 'ッサー' => 'ssaa',
  826. 'ッセー' => 'ssee',
  827. 'ッシー' => 'sshii',
  828. 'ッソー' => 'ssoo',
  829. 'ッスー' => 'ssuu',
  830. 'ッザー' => 'zzaa',
  831. 'ッゼー' => 'zzee',
  832. 'ッジー' => 'jjii',
  833. 'ッゾー' => 'zzoo',
  834. 'ッズー' => 'zzuu',
  835. 'ッター' => 'ttaa',
  836. 'ッテー' => 'ttee',
  837. 'ッチー' => 'chii',
  838. 'ットー' => 'ttoo',
  839. 'ッツー' => 'ttsuu',
  840. 'ッダー' => 'ddaa',
  841. 'ッデー' => 'ddee',
  842. 'ッヂー' => 'ddii',
  843. 'ッドー' => 'ddoo',
  844. 'ッヅー' => 'dduu',
  845. // 2 character syllables - normal
  846. 'ファ' => 'fa',
  847. 'フェ' => 'fe',
  848. 'フィ' => 'fi',
  849. 'フォ' => 'fo',
  850. 'フゥ' => 'fu',
  851. // 'フャ'=>'fya',
  852. // 'フェ'=>'fye',
  853. // 'フィ'=>'fyi',
  854. // 'フョ'=>'fyo',
  855. // 'フュ'=>'fyu',
  856. 'フャ' => 'fa',
  857. 'フェ' => 'fe',
  858. 'フィ' => 'fi',
  859. 'フョ' => 'fo',
  860. 'フュ' => 'fu',
  861. 'ヒャ' => 'hya',
  862. 'ヒェ' => 'hye',
  863. 'ヒィ' => 'hyi',
  864. 'ヒョ' => 'hyo',
  865. 'ヒュ' => 'hyu',
  866. 'ビャ' => 'bya',
  867. 'ビェ' => 'bye',
  868. 'ビィ' => 'byi',
  869. 'ビョ' => 'byo',
  870. 'ビュ' => 'byu',
  871. 'ピャ' => 'pya',
  872. 'ピェ' => 'pye',
  873. 'ピィ' => 'pyi',
  874. 'ピョ' => 'pyo',
  875. 'ピュ' => 'pyu',
  876. 'キャ' => 'kya',
  877. 'キェ' => 'kye',
  878. 'キィ' => 'kyi',
  879. 'キョ' => 'kyo',
  880. 'キュ' => 'kyu',
  881. 'ギャ' => 'gya',
  882. 'ギェ' => 'gye',
  883. 'ギィ' => 'gyi',
  884. 'ギョ' => 'gyo',
  885. 'ギュ' => 'gyu',
  886. 'ミャ' => 'mya',
  887. 'ミェ' => 'mye',
  888. 'ミィ' => 'myi',
  889. 'ミョ' => 'myo',
  890. 'ミュ' => 'myu',
  891. 'ニャ' => 'nya',
  892. 'ニェ' => 'nye',
  893. 'ニィ' => 'nyi',
  894. 'ニョ' => 'nyo',
  895. 'ニュ' => 'nyu',
  896. 'リャ' => 'rya',
  897. 'リェ' => 'rye',
  898. 'リィ' => 'ryi',
  899. 'リョ' => 'ryo',
  900. 'リュ' => 'ryu',
  901. 'シャ' => 'sha',
  902. 'シェ' => 'she',
  903. 'ショ' => 'sho',
  904. 'シュ' => 'shu',
  905. 'ジャ' => 'ja',
  906. 'ジェ' => 'je',
  907. 'ジョ' => 'jo',
  908. 'ジュ' => 'ju',
  909. 'スァ' => 'swa',
  910. 'スェ' => 'swe',
  911. 'スィ' => 'swi',
  912. 'スォ' => 'swo',
  913. 'スゥ' => 'swu',
  914. 'デァ' => 'da',
  915. 'デェ' => 'de',
  916. 'ディ' => 'di',
  917. 'デォ' => 'do',
  918. 'デゥ' => 'du',
  919. 'チャ' => 'cha',
  920. 'チェ' => 'che',
  921. 'チ' => 'chi',
  922. 'チョ' => 'cho',
  923. 'チュ' => 'chu',
  924. // 'ヂャ'=>'dya',
  925. // 'ヂェ'=>'dye',
  926. // 'ヂィ'=>'dyi',
  927. // 'ヂョ'=>'dyo',
  928. // 'ヂュ'=>'dyu',
  929. 'ツャ' => 'tsa',
  930. 'ツェ' => 'tse',
  931. 'ツィ' => 'tsi',
  932. 'ツョ' => 'tso',
  933. 'ツ' => 'tsu',
  934. 'トァ' => 'twa',
  935. 'トェ' => 'twe',
  936. 'トィ' => 'twi',
  937. 'トォ' => 'two',
  938. 'トゥ' => 'twu',
  939. 'ドァ' => 'dwa',
  940. 'ドェ' => 'dwe',
  941. 'ドィ' => 'dwi',
  942. 'ドォ' => 'dwo',
  943. 'ドゥ' => 'dwu',
  944. 'ウァ' => 'wha',
  945. 'ウェ' => 'whe',
  946. 'ウィ' => 'whi',
  947. 'ウォ' => 'who',
  948. 'ウゥ' => 'whu',
  949. 'ヴャ' => 'vya',
  950. 'ヴェ' => 'vye',
  951. 'ヴィ' => 'vyi',
  952. 'ヴョ' => 'vyo',
  953. 'ヴュ' => 'vyu',
  954. 'ヴァ' => 'va',
  955. 'ヴェ' => 've',
  956. 'ヴィ' => 'vi',
  957. 'ヴォ' => 'vo',
  958. 'ヴ' => 'vu',
  959. 'ウェ' => 'we',
  960. 'ウィ' => 'wi',
  961. 'イェ' => 'ye',
  962. 'ティ' => 'ti',
  963. 'ヂィ' => 'di',
  964. // 2 character syllables - doubled vocal
  965. 'アー' => 'aa',
  966. 'エー' => 'ee',
  967. 'イー' => 'ii',
  968. 'オー' => 'oo',
  969. 'ウー' => 'uu',
  970. 'ダー' => 'daa',
  971. 'デー' => 'dee',
  972. 'ヂー' => 'dii',
  973. 'ドー' => 'doo',
  974. 'ヅー' => 'duu',
  975. 'ハー' => 'haa',
  976. 'ヘー' => 'hee',
  977. 'ヒー' => 'hii',
  978. 'ホー' => 'hoo',
  979. 'フー' => 'fuu',
  980. 'バー' => 'baa',
  981. 'ベー' => 'bee',
  982. 'ビー' => 'bii',
  983. 'ボー' => 'boo',
  984. 'ブー' => 'buu',
  985. 'パー' => 'paa',
  986. 'ペー' => 'pee',
  987. 'ピー' => 'pii',
  988. 'ポー' => 'poo',
  989. 'プー' => 'puu',
  990. 'ケー' => 'kee',
  991. 'キー' => 'kii',
  992. 'コー' => 'koo',
  993. 'クー' => 'kuu',
  994. 'カー' => 'kaa',
  995. 'ガー' => 'gaa',
  996. 'ゲー' => 'gee',
  997. 'ギー' => 'gii',
  998. 'ゴー' => 'goo',
  999. 'グー' => 'guu',
  1000. 'マー' => 'maa',
  1001. 'メー' => 'mee',
  1002. 'ミー' => 'mii',
  1003. 'モー' => 'moo',
  1004. 'ムー' => 'muu',
  1005. 'ナー' => 'naa',
  1006. 'ネー' => 'nee',
  1007. 'ニー' => 'nii',
  1008. 'ノー' => 'noo',
  1009. 'ヌー' => 'nuu',
  1010. 'ラー' => 'raa',
  1011. 'レー' => 'ree',
  1012. 'リー' => 'rii',
  1013. 'ロー' => 'roo',
  1014. 'ルー' => 'ruu',
  1015. 'サー' => 'saa',
  1016. 'セー' => 'see',
  1017. 'シー' => 'shii',
  1018. 'ソー' => 'soo',
  1019. 'スー' => 'suu',
  1020. 'ザー' => 'zaa',
  1021. 'ゼー' => 'zee',
  1022. 'ジー' => 'jii',
  1023. 'ゾー' => 'zoo',
  1024. 'ズー' => 'zuu',
  1025. 'ター' => 'taa',
  1026. 'テー' => 'tee',
  1027. 'チー' => 'chii',
  1028. 'トー' => 'too',
  1029. 'ツー' => 'tsuu',
  1030. 'ワー' => 'waa',
  1031. 'ヲー' => 'woo',
  1032. 'ヤー' => 'yaa',
  1033. 'ヨー' => 'yoo',
  1034. 'ユー' => 'yuu',
  1035. 'ヵー' => 'kaa',
  1036. 'ヶー' => 'kee',
  1037. // old characters
  1038. 'ヱー' => 'wee',
  1039. 'ヰー' => 'wii',
  1040. // seperate katakana 'n'
  1041. 'ンア' => 'n_a',
  1042. 'ンエ' => 'n_e',
  1043. 'ンイ' => 'n_i',
  1044. 'ンオ' => 'n_o',
  1045. 'ンウ' => 'n_u',
  1046. 'ンヤ' => 'n_ya',
  1047. 'ンヨ' => 'n_yo',
  1048. 'ンユ' => 'n_yu',
  1049. // 2 character syllables - doubled consonants
  1050. 'ッバ' => 'bba',
  1051. 'ッベ' => 'bbe',
  1052. 'ッビ' => 'bbi',
  1053. 'ッボ' => 'bbo',
  1054. 'ッブ' => 'bbu',
  1055. 'ッパ' => 'ppa',
  1056. 'ッペ' => 'ppe',
  1057. 'ッピ' => 'ppi',
  1058. 'ッポ' => 'ppo',
  1059. 'ップ' => 'ppu',
  1060. 'ッケ' => 'kke',
  1061. 'ッキ' => 'kki',
  1062. 'ッコ' => 'kko',
  1063. 'ック' => 'kku',
  1064. 'ッカ' => 'kka',
  1065. 'ッガ' => 'gga',
  1066. 'ッゲ' => 'gge',
  1067. 'ッギ' => 'ggi',
  1068. 'ッゴ' => 'ggo',
  1069. 'ッグ' => 'ggu',
  1070. 'ッマ' => 'ma',
  1071. 'ッメ' => 'me',
  1072. 'ッミ' => 'mi',
  1073. 'ッモ' => 'mo',
  1074. 'ッム' => 'mu',
  1075. 'ッナ' => 'nna',
  1076. 'ッネ' => 'nne',
  1077. 'ッニ' => 'nni',
  1078. 'ッノ' => 'nno',
  1079. 'ッヌ' => 'nnu',
  1080. 'ッラ' => 'rra',
  1081. 'ッレ' => 'rre',
  1082. 'ッリ' => 'rri',
  1083. 'ッロ' => 'rro',
  1084. 'ッル' => 'rru',
  1085. 'ッサ' => 'ssa',
  1086. 'ッセ' => 'sse',
  1087. 'ッシ' => 'sshi',
  1088. 'ッソ' => 'sso',
  1089. 'ッス' => 'ssu',
  1090. 'ッザ' => 'zza',
  1091. 'ッゼ' => 'zze',
  1092. 'ッジ' => 'jji',
  1093. 'ッゾ' => 'zzo',
  1094. 'ッズ' => 'zzu',
  1095. 'ッタ' => 'tta',
  1096. 'ッテ' => 'tte',
  1097. 'ッチ' => 'cchi',
  1098. 'ット' => 'tto',
  1099. 'ッツ' => 'ttsu',
  1100. 'ッダ' => 'dda',
  1101. 'ッデ' => 'dde',
  1102. 'ッヂ' => 'ddi',
  1103. 'ッド' => 'ddo',
  1104. 'ッヅ' => 'ddu',
  1105. // 1 character syllables
  1106. 'ア' => 'a',
  1107. 'エ' => 'e',
  1108. 'イ' => 'i',
  1109. 'オ' => 'o',
  1110. 'ウ' => 'u',
  1111. 'ン' => 'n',
  1112. 'ハ' => 'ha',
  1113. 'ヘ' => 'he',
  1114. 'ヒ' => 'hi',
  1115. 'ホ' => 'ho',
  1116. 'フ' => 'fu',
  1117. 'バ' => 'ba',
  1118. 'ベ' => 'be',
  1119. 'ビ' => 'bi',
  1120. 'ボ' => 'bo',
  1121. 'ブ' => 'bu',
  1122. 'パ' => 'pa',
  1123. 'ペ' => 'pe',
  1124. 'ピ' => 'pi',
  1125. 'ポ' => 'po',
  1126. 'プ' => 'pu',
  1127. 'ケ' => 'ke',
  1128. 'キ' => 'ki',
  1129. 'コ' => 'ko',
  1130. 'ク' => 'ku',
  1131. 'カ' => 'ka',
  1132. 'ガ' => 'ga',
  1133. 'ゲ' => 'ge',
  1134. 'ギ' => 'gi',
  1135. 'ゴ' => 'go',
  1136. 'グ' => 'gu',
  1137. 'マ' => 'ma',
  1138. 'メ' => 'me',
  1139. 'ミ' => 'mi',
  1140. 'モ' => 'mo',
  1141. 'ム' => 'mu',
  1142. 'ナ' => 'na',
  1143. 'ネ' => 'ne',
  1144. 'ニ' => 'ni',
  1145. 'ノ' => 'no',
  1146. 'ヌ' => 'nu',
  1147. 'ラ' => 'ra',
  1148. 'レ' => 're',
  1149. 'リ' => 'ri',
  1150. 'ロ' => 'ro',
  1151. 'ル' => 'ru',
  1152. 'サ' => 'sa',
  1153. 'セ' => 'se',
  1154. 'シ' => 'shi',
  1155. 'ソ' => 'so',
  1156. 'ス' => 'su',
  1157. 'ザ' => 'za',
  1158. 'ゼ' => 'ze',
  1159. 'ジ' => 'ji',
  1160. 'ゾ' => 'zo',
  1161. 'ズ' => 'zu',
  1162. 'タ' => 'ta',
  1163. 'テ' => 'te',
  1164. 'チ' => 'chi',
  1165. 'ト' => 'to',
  1166. 'ツ' => 'tsu',
  1167. 'ダ' => 'da',
  1168. 'デ' => 'de',
  1169. 'ヂ' => 'di',
  1170. 'ド' => 'do',
  1171. 'ヅ' => 'du',
  1172. 'ワ' => 'wa',
  1173. 'ヲ' => 'wo',
  1174. 'ヤ' => 'ya',
  1175. 'ヨ' => 'yo',
  1176. 'ユ' => 'yu',
  1177. 'ヵ' => 'ka',
  1178. 'ヶ' => 'ke',
  1179. // old characters
  1180. 'ヱ' => 'we',
  1181. 'ヰ' => 'wi',
  1182. // convert what's left (probably only kicks in when something's missing above)
  1183. 'ァ' => 'a',
  1184. 'ェ' => 'e',
  1185. 'ィ' => 'i',
  1186. 'ォ' => 'o',
  1187. 'ゥ' => 'u',
  1188. 'ャ' => 'ya',
  1189. 'ョ' => 'yo',
  1190. 'ュ' => 'yu',
  1191. // special characters
  1192. '・' => '_',
  1193. '、' => '_',
  1194. 'ー' => '_',
  1195. // when used with hiragana (seldom), this character would not be converted otherwise
  1196. // 'ラ'=>'la',
  1197. // 'レ'=>'le',
  1198. // 'リ'=>'li',
  1199. // 'ロ'=>'lo',
  1200. // 'ル'=>'lu',
  1201. // 'チャ'=>'cya',
  1202. // 'チェ'=>'cye',
  1203. // 'チィ'=>'cyi',
  1204. // 'チョ'=>'cyo',
  1205. // 'チュ'=>'cyu',
  1206. // 'デャ'=>'dha',
  1207. // 'デェ'=>'dhe',
  1208. // 'ディ'=>'dhi',
  1209. // 'デョ'=>'dho',
  1210. // 'デュ'=>'dhu',
  1211. // 'リャ'=>'lya',
  1212. // 'リェ'=>'lye',
  1213. // 'リィ'=>'lyi',
  1214. // 'リョ'=>'lyo',
  1215. // 'リュ'=>'lyu',
  1216. // 'テャ'=>'tha',
  1217. // 'テェ'=>'the',
  1218. // 'ティ'=>'thi',
  1219. // 'テョ'=>'tho',
  1220. // 'テュ'=>'thu',
  1221. // 'ファ'=>'fwa',
  1222. // 'フェ'=>'fwe',
  1223. // 'フィ'=>'fwi',
  1224. // 'フォ'=>'fwo',
  1225. // 'フゥ'=>'fwu',
  1226. // 'チャ'=>'tya',
  1227. // 'チェ'=>'tye',
  1228. // 'チィ'=>'tyi',
  1229. // 'チョ'=>'tyo',
  1230. // 'チュ'=>'tyu',
  1231. // 'ジャ'=>'jya',
  1232. // 'ジェ'=>'jye',
  1233. // 'ジィ'=>'jyi',
  1234. // 'ジョ'=>'jyo',
  1235. // 'ジュ'=>'jyu',
  1236. // 'ジャ'=>'zha',
  1237. // 'ジェ'=>'zhe',
  1238. // 'ジィ'=>'zhi',
  1239. // 'ジョ'=>'zho',
  1240. // 'ジュ'=>'zhu',
  1241. // 'ジャ'=>'zya',
  1242. // 'ジェ'=>'zye',
  1243. // 'ジィ'=>'zyi',
  1244. // 'ジョ'=>'zyo',
  1245. // 'ジュ'=>'zyu',
  1246. // 'シャ'=>'sya',
  1247. // 'シェ'=>'sye',
  1248. // 'シィ'=>'syi',
  1249. // 'ショ'=>'syo',
  1250. // 'シュ'=>'syu',
  1251. // 'シ'=>'ci',
  1252. // 'フ'=>'hu',
  1253. // 'シ'=>'si',
  1254. // 'チ'=>'ti',
  1255. // 'ツ'=>'tu',
  1256. // 'イ'=>'yi',
  1257. // 'ヂ'=>'dzi',
  1258. // "Greeklish"
  1259. 'Α' => 'a',
  1260. 'Ά' => 'a',
  1261. 'Β' => 'b',
  1262. 'Γ' => 'g',
  1263. 'Δ' => 'd',
  1264. 'Ε' => 'e',
  1265. 'Έ' => 'e',
  1266. 'Ζ' => 'z',
  1267. 'Η' => 'i',
  1268. 'Ή' => 'i',
  1269. 'Θ' => 'th',
  1270. 'Ι' => 'i',
  1271. 'Ί' => 'i',
  1272. 'Ϊ' => 'i',
  1273. 'ΐ' => 'i',
  1274. 'Κ' => 'k',
  1275. 'Λ' => 'l',
  1276. 'Μ' => 'm',
  1277. 'Ν' => 'n',
  1278. 'Ξ' => 'x',
  1279. 'Ο' => 'o',
  1280. 'Ό' => 'o',
  1281. 'Π' => 'p',
  1282. 'Ρ' => 'r',
  1283. 'Σ' => 's',
  1284. 'Τ' => 't',
  1285. 'Υ' => 'y',
  1286. 'Ύ' => 'y',
  1287. 'Ϋ' => 'y',
  1288. 'ΰ' => 'y',
  1289. 'Φ' => 'f',
  1290. 'Χ' => 'ch',
  1291. 'Ψ' => 'ps',
  1292. 'Ω' => 'o',
  1293. 'Ώ' => 'o',
  1294. 'α' => 'a',
  1295. 'ά' => 'a',
  1296. 'β' => 'b',
  1297. 'γ' => 'g',
  1298. 'δ' => 'd',
  1299. 'ε' => 'e',
  1300. 'έ' => 'e',
  1301. 'ζ' => 'z',
  1302. 'η' => 'i',
  1303. 'ή' => 'i',
  1304. 'θ' => 'th',
  1305. 'ι' => 'i',
  1306. 'ί' => 'i',
  1307. 'ϊ' => 'i',
  1308. 'κ' => 'k',
  1309. 'λ' => 'l',
  1310. 'μ' => 'm',
  1311. 'ν' => 'n',
  1312. 'ξ' => 'x',
  1313. 'ο' => 'o',
  1314. 'ό' => 'o',
  1315. 'π' => 'p',
  1316. 'ρ' => 'r',
  1317. 'σ' => 's',
  1318. 'ς' => 's',
  1319. 'τ' => 't',
  1320. 'υ' => 'y',
  1321. 'ύ' => 'y',
  1322. 'ϋ' => 'y',
  1323. 'φ' => 'f',
  1324. 'χ' => 'ch',
  1325. 'ψ' => 'ps',
  1326. 'ω' => 'o',
  1327. 'ώ' => 'o',
  1328. // Thai
  1329. 'ก' => 'k',
  1330. 'ข' => 'kh',
  1331. 'ฃ' => 'kh',
  1332. 'ค' => 'kh',
  1333. 'ฅ' => 'kh',
  1334. 'ฆ' => 'kh',
  1335. 'ง' => 'ng',
  1336. 'จ' => 'ch',
  1337. 'ฉ' => 'ch',
  1338. 'ช' => 'ch',
  1339. 'ซ' => 's',
  1340. 'ฌ' => 'ch',
  1341. 'ญ' => 'y',
  1342. 'ฎ' => 'd',
  1343. 'ฏ' => 't',
  1344. 'ฐ' => 'th',
  1345. 'ฑ' => 'd',
  1346. 'ฒ' => 'th',
  1347. 'ณ' => 'n',
  1348. 'ด' => 'd',
  1349. 'ต' => 't',
  1350. 'ถ' => 'th',
  1351. 'ท' => 'th',
  1352. 'ธ' => 'th',
  1353. 'น' => 'n',
  1354. 'บ' => 'b',
  1355. 'ป' => 'p',
  1356. 'ผ' => 'ph',
  1357. 'ฝ' => 'f',
  1358. 'พ' => 'ph',
  1359. 'ฟ' => 'f',
  1360. 'ภ' => 'ph',
  1361. 'ม' => 'm',
  1362. 'ย' => 'y',
  1363. 'ร' => 'r',
  1364. 'ฤ' => 'rue',
  1365. 'ฤๅ' => 'rue',
  1366. 'ล' => 'l',
  1367. 'ฦ' => 'lue',
  1368. 'ฦๅ' => 'lue',
  1369. 'ว' => 'w',
  1370. 'ศ' => 's',
  1371. 'ษ' => 's',
  1372. 'ส' => 's',
  1373. 'ห' => 'h',
  1374. 'ฬ' => 'l',
  1375. 'ฮ' => 'h',
  1376. 'ะ' => 'a',
  1377. 'ั' => 'a',
  1378. 'รร' => 'a',
  1379. 'า' => 'a',
  1380. 'ๅ' => 'a',
  1381. 'ำ' => 'am',
  1382. 'ํา' => 'am',
  1383. 'ิ' => 'i',
  1384. 'ี' => 'i',
  1385. 'ึ' => 'ue',
  1386. 'ี' => 'ue',
  1387. 'ุ' => 'u',
  1388. 'ู' => 'u',
  1389. 'เ' => 'e',
  1390. 'แ' => 'ae',
  1391. 'โ' => 'o',
  1392. 'อ' => 'o',
  1393. 'ียะ' => 'ia',
  1394. 'ีย' => 'ia',
  1395. 'ือะ' => 'uea',
  1396. 'ือ' => 'uea',
  1397. 'ัวะ' => 'ua',
  1398. 'ัว' => 'ua',
  1399. 'ใ' => 'ai',
  1400. 'ไ' => 'ai',
  1401. 'ัย' => 'ai',
  1402. 'าย' => 'ai',
  1403. 'าว' => 'ao',
  1404. 'ุย' => 'ui',
  1405. 'อย' => 'oi',
  1406. 'ือย' => 'ueai',
  1407. 'วย' => 'uai',
  1408. 'ิว' => 'io',
  1409. '็ว' => 'eo',
  1410. 'ียว' => 'iao',
  1411. '่' => '',
  1412. '้' => '',
  1413. '๊' => '',
  1414. '๋' => '',
  1415. '็' => '',
  1416. '์' => '',
  1417. '๎' => '',
  1418. 'ํ' => '',
  1419. 'ฺ' => '',
  1420. 'ๆ' => '2',
  1421. '๏' => 'o',
  1422. 'ฯ' => '-',
  1423. '๚' => '-',
  1424. '๛' => '-',
  1425. '๐' => '0',
  1426. '๑' => '1',
  1427. '๒' => '2',
  1428. '๓' => '3',
  1429. '๔' => '4',
  1430. '๕' => '5',
  1431. '๖' => '6',
  1432. '๗' => '7',
  1433. '๘' => '8',
  1434. '๙' => '9',
  1435. // Korean
  1436. 'ㄱ' => 'k', 'ㅋ' => 'kh',
  1437. 'ㄲ' => 'kk',
  1438. 'ㄷ' => 't',
  1439. 'ㅌ' => 'th',
  1440. 'ㄸ' => 'tt',
  1441. 'ㅂ' => 'p',
  1442. 'ㅍ' => 'ph',
  1443. 'ㅃ' => 'pp',
  1444. 'ㅈ' => 'c',
  1445. 'ㅊ' => 'ch',
  1446. 'ㅉ' => 'cc',
  1447. 'ㅅ' => 's',
  1448. 'ㅆ' => 'ss',
  1449. 'ㅎ' => 'h',
  1450. 'ㅇ' => 'ng',
  1451. 'ㄴ' => 'n',
  1452. 'ㄹ' => 'l',
  1453. 'ㅁ' => 'm',
  1454. 'ㅏ' => 'a',
  1455. 'ㅓ' => 'e',
  1456. 'ㅗ' => 'o',
  1457. 'ㅜ' => 'wu',
  1458. 'ㅡ' => 'u',
  1459. 'ㅣ' => 'i',
  1460. 'ㅐ' => 'ay',
  1461. 'ㅔ' => 'ey',
  1462. 'ㅚ' => 'oy',
  1463. 'ㅘ' => 'wa',
  1464. 'ㅝ' => 'we',
  1465. 'ㅟ' => 'wi',
  1466. 'ㅙ' => 'way',
  1467. 'ㅞ' => 'wey',
  1468. 'ㅢ' => 'uy',
  1469. 'ㅑ' => 'ya',
  1470. 'ㅕ' => 'ye',
  1471. 'ㅛ' => 'oy',
  1472. 'ㅠ' => 'yu',
  1473. 'ㅒ' => 'yay',
  1474. 'ㅖ' => 'yey',
  1475. ];