interscript 0.1.7 → 2.1.0b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/Gemfile +29 -0
  5. data/LICENSE.adoc +31 -0
  6. data/README.md +3 -0
  7. data/Rakefile +116 -0
  8. data/bin/console +14 -0
  9. data/bin/interscript +5 -0
  10. data/bin/maps_analyze_staging +168 -0
  11. data/bin/maps_debug_compilers +58 -0
  12. data/bin/maps_debug_ordering +88 -0
  13. data/bin/maps_debug_ruby_compile +24 -0
  14. data/bin/maps_debug_step_by_step +44 -0
  15. data/bin/maps_optimize_order +112 -0
  16. data/bin/maps_v1_analyze_regexps +45 -0
  17. data/bin/maps_v1_to_v2 +426 -0
  18. data/bin/setup +8 -0
  19. data/exe/interscript +6 -0
  20. data/interscript.gemspec +31 -0
  21. data/lib/interscript.rb +83 -133
  22. data/lib/interscript/command.rb +5 -5
  23. data/lib/interscript/compiler.rb +22 -0
  24. data/lib/interscript/compiler/javascript.rb +292 -0
  25. data/lib/interscript/compiler/ruby.rb +262 -0
  26. data/lib/interscript/dsl.rb +68 -0
  27. data/lib/interscript/dsl/aliases.rb +23 -0
  28. data/lib/interscript/dsl/document.rb +46 -0
  29. data/lib/interscript/dsl/group.rb +45 -0
  30. data/lib/interscript/dsl/group/parallel.rb +6 -0
  31. data/lib/interscript/dsl/items.rb +89 -0
  32. data/lib/interscript/dsl/metadata.rb +68 -0
  33. data/lib/interscript/dsl/stage.rb +6 -0
  34. data/lib/interscript/dsl/symbol_mm.rb +11 -0
  35. data/lib/interscript/dsl/tests.rb +12 -0
  36. data/lib/interscript/interpreter.rb +251 -0
  37. data/lib/interscript/node.rb +25 -0
  38. data/lib/interscript/node/alias_def.rb +15 -0
  39. data/lib/interscript/node/dependency.rb +13 -0
  40. data/lib/interscript/node/document.rb +45 -0
  41. data/lib/interscript/node/group.rb +34 -0
  42. data/lib/interscript/node/group/parallel.rb +9 -0
  43. data/lib/interscript/node/group/sequential.rb +2 -0
  44. data/lib/interscript/node/item.rb +52 -0
  45. data/lib/interscript/node/item/alias.rb +42 -0
  46. data/lib/interscript/node/item/any.rb +76 -0
  47. data/lib/interscript/node/item/capture.rb +50 -0
  48. data/lib/interscript/node/item/group.rb +51 -0
  49. data/lib/interscript/node/item/repeat.rb +40 -0
  50. data/lib/interscript/node/item/stage.rb +23 -0
  51. data/lib/interscript/node/item/string.rb +51 -0
  52. data/lib/interscript/node/metadata.rb +18 -0
  53. data/lib/interscript/node/rule.rb +6 -0
  54. data/lib/interscript/node/rule/funcall.rb +18 -0
  55. data/lib/interscript/node/rule/run.rb +15 -0
  56. data/lib/interscript/node/rule/sub.rb +68 -0
  57. data/lib/interscript/node/stage.rb +19 -0
  58. data/lib/interscript/node/tests.rb +15 -0
  59. data/lib/interscript/stdlib.rb +211 -0
  60. data/lib/interscript/utils/regexp_converter.rb +283 -0
  61. data/lib/interscript/version.rb +1 -1
  62. data/lib/interscript/visualize.rb +61 -0
  63. data/lib/interscript/visualize/group.html.erb +59 -0
  64. data/lib/interscript/visualize/json.rb +57 -0
  65. data/lib/interscript/visualize/map.html.erb +46 -0
  66. data/lib/interscript/visualize/nodes.rb +89 -0
  67. data/requirements.txt +1 -0
  68. metadata +78 -416
  69. data/README.adoc +0 -298
  70. data/lib/g2pwrapper.py +0 -34
  71. data/lib/interscript/fs.rb +0 -69
  72. data/lib/interscript/mapping.rb +0 -142
  73. data/lib/interscript/opal.rb +0 -57
  74. data/lib/interscript/opal/entrypoint.rb +0 -12
  75. data/lib/interscript/opal/map_translate.rb +0 -7
  76. data/lib/interscript/opal/maps.js.erb +0 -10
  77. data/lib/model-7 +0 -0
  78. data/lib/tha-pt-b-7 +0 -0
  79. data/maps/acadsin-zho-Hani-Latn-2002.yaml +0 -38916
  80. data/maps/alalc-amh-Ethi-Latn-1997.yaml +0 -513
  81. data/maps/alalc-amh-Ethi-Latn-2011.yaml +0 -138
  82. data/maps/alalc-ara-Arab-Latn-1997.yaml +0 -1287
  83. data/maps/alalc-asm-Deva-Latn-1997.yaml +0 -165
  84. data/maps/alalc-asm-Deva-Latn-2012.yaml +0 -40
  85. data/maps/alalc-aze-Cyrl-Latn-1997.yaml +0 -145
  86. data/maps/alalc-bel-Cyrl-Latn-1997.yaml +0 -129
  87. data/maps/alalc-ben-Beng-Latn-2017.yaml +0 -130
  88. data/maps/alalc-bul-Cyrl-Latn-1997.yaml +0 -98
  89. data/maps/alalc-ell-Grek-Latn-1997.yaml +0 -628
  90. data/maps/alalc-ell-Grek-Latn-2010.yaml +0 -626
  91. data/maps/alalc-guj-Gujr-Latn-1997.yaml +0 -266
  92. data/maps/alalc-guj-Gujr-Latn-2011.yaml +0 -64
  93. data/maps/alalc-hin-Deva-Latn-1997.yaml +0 -211
  94. data/maps/alalc-hin-Deva-Latn-2011.yaml +0 -47
  95. data/maps/alalc-kat-Geok-Latn-1997.yaml +0 -111
  96. data/maps/alalc-kat-Geor-Latn-1997.yaml +0 -150
  97. data/maps/alalc-kor-Hang-Latn-1997.yaml +0 -98
  98. data/maps/alalc-mal-Mlym-Latn-1997.yaml +0 -303
  99. data/maps/alalc-mal-Mlym-Latn-2012.yaml +0 -73
  100. data/maps/alalc-mar-Deva-Latn-1997.yaml +0 -189
  101. data/maps/alalc-mar-Deva-Latn-2011.yaml +0 -45
  102. data/maps/alalc-mkd-Cyrl-Latn-1997.yaml +0 -114
  103. data/maps/alalc-mkd-Cyrl-Latn-2013.yaml +0 -103
  104. data/maps/alalc-mon-Cyrl-Latn-1997.yaml +0 -220
  105. data/maps/alalc-pan-Guru-Latn-1997.yaml +0 -256
  106. data/maps/alalc-pan-Guru-Latn-2011.yaml +0 -78
  107. data/maps/alalc-per-Arab-Latn-1997.yaml +0 -375
  108. data/maps/alalc-pli-Deva-Latn-2012.yaml +0 -144
  109. data/maps/alalc-pra-Deva-Latn-2012.yaml +0 -47
  110. data/maps/alalc-rus-Cyrl-Latn-1997.yaml +0 -225
  111. data/maps/alalc-rus-Cyrl-Latn-2012.yaml +0 -162
  112. data/maps/alalc-san-Deva-Latn-2012.yaml +0 -172
  113. data/maps/alalc-sin-Sinh-Latn-1997.yaml +0 -292
  114. data/maps/alalc-sin-Sinh-Latn-2011.yaml +0 -71
  115. data/maps/alalc-srp-Cyrl-Latn-1997.yaml +0 -118
  116. data/maps/alalc-srp-Cyrl-Latn-2013.yaml +0 -135
  117. data/maps/alalc-tam-Taml-Latn-1997.yaml +0 -62
  118. data/maps/alalc-tam-Taml-Latn-2011.yaml +0 -58
  119. data/maps/alalc-ukr-Cyrl-Latn-1997.yaml +0 -145
  120. data/maps/alalc-ukr-Cyrl-Latn-2011.yaml +0 -16
  121. data/maps/apcbg-bul-Cyrl-Latn-1995.yaml +0 -283
  122. data/maps/bas-rus-Cyrl-Latn-2017-bss.yaml +0 -174
  123. data/maps/bas-rus-Cyrl-Latn-2017-oss.yaml +0 -169
  124. data/maps/bgn-jpn-Hrkt-Latn-1962.yaml +0 -292
  125. data/maps/bgn-kor-Hang-Latn-1943.yaml +0 -35
  126. data/maps/bgn-kor-Kore-Latn-1943.yaml +0 -31
  127. data/maps/bgna-bul-Cyrl-Latn-2006.yaml +0 -208
  128. data/maps/bgna-bul-Cyrl-Latn-2009.yaml +0 -208
  129. data/maps/bgnpcgn-amh-Ethi-Latn-1967.yaml +0 -532
  130. data/maps/bgnpcgn-ara-Arab-Latn-1956.yaml +0 -596
  131. data/maps/bgnpcgn-arm-Armn-Latn-1981.yaml +0 -108
  132. data/maps/bgnpcgn-aze-Cyrl-Latn-1993.yaml +0 -104
  133. data/maps/bgnpcgn-bak-Cyrl-Latn-2007.yaml +0 -188
  134. data/maps/bgnpcgn-bel-Cyrl-Latn-1979.yaml +0 -289
  135. data/maps/bgnpcgn-bul-Cyrl-Latn-1952.yaml +0 -119
  136. data/maps/bgnpcgn-bul-Cyrl-Latn-2013.yaml +0 -42
  137. data/maps/bgnpcgn-che-Cyrl-Latn-2008.yaml +0 -184
  138. data/maps/bgnpcgn-ell-Grek-Latn-1962.yaml +0 -705
  139. data/maps/bgnpcgn-ell-Grek-Latn-1996.yaml +0 -23
  140. data/maps/bgnpcgn-fas-Arab-Latn-1956.yaml +0 -96
  141. data/maps/bgnpcgn-jpn-Hrkt-Latn-1976.yaml +0 -257
  142. data/maps/bgnpcgn-kat-Geor-Latn-1981.yaml +0 -131
  143. data/maps/bgnpcgn-kat-Geor-Latn-2009.yaml +0 -42
  144. data/maps/bgnpcgn-kor-Hang-Latn-kn-1945.yaml +0 -253
  145. data/maps/bgnpcgn-kor-Hang-Latn-rok-2011.yaml +0 -48
  146. data/maps/bgnpcgn-kor-Kore-Latn-rok-2011.yaml +0 -48
  147. data/maps/bgnpcgn-mkd-Cyrl-Latn-1981.yaml +0 -163
  148. data/maps/bgnpcgn-mkd-Cyrl-Latn-2013.yaml +0 -190
  149. data/maps/bgnpcgn-mon-Cyrl-Latn-1964.yaml +0 -223
  150. data/maps/bgnpcgn-nep-Deva-Latn-2011.yaml +0 -230
  151. data/maps/bgnpcgn-per-Arab-Latn-1958.yaml +0 -336
  152. data/maps/bgnpcgn-prs-Arab-Latn-2007.yaml +0 -639
  153. data/maps/bgnpcgn-prs-Arab-Latn-yaghoubi.yaml +0 -459
  154. data/maps/bgnpcgn-rue-Cyrl-Latn-2016.yaml +0 -168
  155. data/maps/bgnpcgn-rus-Cyrl-Latn-1947.yaml +0 -318
  156. data/maps/bgnpcgn-srp-Cyrl-Latn-2005.yaml +0 -170
  157. data/maps/bgnpcgn-tat-Cyrl-Latn-2007.yaml +0 -220
  158. data/maps/bgnpcgn-tgk-Cyrl-Latn-1994.yaml +0 -240
  159. data/maps/bgnpcgn-ukr-Cyrl-Latn-1965.yaml +0 -166
  160. data/maps/bgnpcgn-ukr-Cyrl-Latn-2019.yaml +0 -119
  161. data/maps/bgnpcgn-uzb-Cyrl-Latn-1979.yaml +0 -127
  162. data/maps/bgnpcgn-uzb-Cyrl-Latn-2000.yaml +0 -82
  163. data/maps/bgnpcgn-zho-Hans-Latn-1979.yaml +0 -7456
  164. data/maps/bis-asm-Beng-Latn-13194-1991.yaml +0 -159
  165. data/maps/bis-ben-Beng-Latn-13194-1991.yaml +0 -156
  166. data/maps/bis-dev-Deva-Latn-13194-1991.yaml +0 -184
  167. data/maps/bis-guj-Gujr-Latn-13194-1991.yaml +0 -181
  168. data/maps/bis-knd-Knda-Latn-13194-1991.yaml +0 -173
  169. data/maps/bis-mlm-Mlym-Latn-13194-1991.yaml +0 -176
  170. data/maps/bis-ori-Orya-Latn-13194-1991.yaml +0 -160
  171. data/maps/bis-pnj-Guru-Latn-13194-1991.yaml +0 -175
  172. data/maps/bis-tel-Telu-Latn-13194-1991.yaml +0 -170
  173. data/maps/bis-tml-Taml-Latn-13194-1991.yaml +0 -155
  174. data/maps/by-bel-Cyrl-Latn-1998.yaml +0 -172
  175. data/maps/by-bel-Cyrl-Latn-2007.yaml +0 -115
  176. data/maps/din-grc-Grek-Latn-31634-2011-t1.yaml +0 -899
  177. data/maps/din-hin-Deva-Latn-33904-2018.yaml +0 -100
  178. data/maps/din-kat-Geor-Latn-32707-2010.yaml +0 -145
  179. data/maps/din-mar-Deva-Latn-33904-2018.yaml +0 -84
  180. data/maps/din-nep-Deva-Latn-33904-2018.yaml +0 -119
  181. data/maps/din-pli-Deva-Latn-33904-2018.yaml +0 -75
  182. data/maps/din-pra-Deva-Latn-33904-2018.yaml +0 -63
  183. data/maps/din-san-Deva-Latn-33904-2018.yaml +0 -338
  184. data/maps/din-tam-Taml-Latn-33903-2016.yaml +0 -213
  185. data/maps/dos-nep-Deva-Latn-1997.yaml +0 -47
  186. data/maps/elot-ell-Grek-Latn-743-1982-tl.yaml +0 -684
  187. data/maps/elot-ell-Grek-Latn-743-1982-ts.yaml +0 -680
  188. data/maps/elot-ell-Grek-Latn-743-2001-tl.yaml +0 -19
  189. data/maps/elot-ell-Grek-Latn-743-2001-ts.yaml +0 -31
  190. data/maps/ggg-kat-Geor-Latn-2002.yaml +0 -92
  191. data/maps/gki-bel-Cyrl-Latn-1992.yaml +0 -33
  192. data/maps/gki-bel-Cyrl-Latn-2000.yaml +0 -201
  193. data/maps/gost-rus-Cyrl-Latn-16876-71-1983.yaml +0 -190
  194. data/maps/gost-rus-Cyrl-Latn-7.79-2000-2002.yaml +0 -157
  195. data/maps/hk-yue-Hani-Latn-1888.yaml +0 -38497
  196. data/maps/icao-bel-Cyrl-Latn-9303.yaml +0 -136
  197. data/maps/icao-bul-Cyrl-Latn-9303.yaml +0 -118
  198. data/maps/icao-fas-Arab-Latn-9303.yaml +0 -103
  199. data/maps/icao-heb-Hebr-Latn-9303.yaml +0 -151
  200. data/maps/icao-mkd-Cyrl-Latn-9303.yaml +0 -117
  201. data/maps/icao-rus-Cyrl-Latn-9303.yaml +0 -117
  202. data/maps/icao-srp-Cyrl-Latn-9303.yaml +0 -117
  203. data/maps/icao-ukr-Cyrl-Latn-9303.yaml +0 -119
  204. data/maps/iso-ara-Arab-Latn-233-1984.yaml +0 -323
  205. data/maps/iso-asm-Beng-Latn-15919-2001.yaml +0 -75
  206. data/maps/iso-ben-Beng-Latn-15919-2001.yaml +0 -175
  207. data/maps/iso-ell-Grek-Latn-843-1997-t1.yaml +0 -613
  208. data/maps/iso-ell-Grek-Latn-843-1997-t2.yaml +0 -44
  209. data/maps/iso-guj-Gujr-Latn-15919-2001.yaml +0 -220
  210. data/maps/iso-hin-Deva-Latn-15919-2001.yaml +0 -87
  211. data/maps/iso-inc-Deva-Latn-15919-2001.yaml +0 -61
  212. data/maps/iso-jpn-Hrkt-Latn-3602-1989.yaml +0 -66
  213. data/maps/iso-kan-Knda-Latn-15919-2001.yaml +0 -220
  214. data/maps/iso-kat-Geor-Latn-9984-1996.yaml +0 -145
  215. data/maps/iso-kor-Hang-Latn-1996-method1.yaml +0 -240
  216. data/maps/iso-kor-Hang-Latn-1996-method2.yaml +0 -226
  217. data/maps/iso-mal-Mlym-Latn-15919-2001.yaml +0 -281
  218. data/maps/iso-mar-Deva-Latn-15919-2001.yaml +0 -75
  219. data/maps/iso-nep-Deva-Latn-15919-2001.yaml +0 -87
  220. data/maps/iso-ori-Orya-Latn-15919-2001.yaml +0 -193
  221. data/maps/iso-pan-Guru-Latn-15919-2001.yaml +0 -222
  222. data/maps/iso-pli-Beng-Latn-15919-2001.yaml +0 -73
  223. data/maps/iso-pli-Deva-Latn-15919-2001.yaml +0 -74
  224. data/maps/iso-pli-Sinh-Latn-15919-2001.yaml +0 -219
  225. data/maps/iso-pli-Thai-Latn-15919-2001.yaml +0 -55
  226. data/maps/iso-pra-Deva-Latn-15919-2001.yaml +0 -59
  227. data/maps/iso-prs-Arab-Latn-233-3-1999.yaml +0 -366
  228. data/maps/iso-rus-Cyrl-Latn-9-1995.yaml +0 -271
  229. data/maps/iso-san-Deva-Latn-15919-2001.yaml +0 -220
  230. data/maps/iso-tam-Taml-Latn-15919-2001.yaml +0 -159
  231. data/maps/iso-tel-Telu-Latn-15919-2001.yaml +0 -220
  232. data/maps/iso-tha-Thai-Latn-11940-1998.yaml +0 -109
  233. data/maps/kp-kor-Hang-Latn-2002.yaml +0 -909
  234. data/maps/lshk-yue-Hani-Latn-jyutping-1993.yaml +0 -44820
  235. data/maps/mext-jpn-Hrkt-Latn-1954.yaml +0 -411
  236. data/maps/mns-mon-Cyrl-Latn-5217-2012.yaml +0 -163
  237. data/maps/mns-mon-Latn-Cyrl-5217-2012.yaml +0 -200
  238. data/maps/moct-kor-Hang-Latn-2000.yaml +0 -807
  239. data/maps/mofa-jpn-Hrkt-Latn-1989.yaml +0 -541
  240. data/maps/mvd-bel-Cyrl-Latn-2008.yaml +0 -225
  241. data/maps/mvd-bel-Cyrl-Latn-2010.yaml +0 -63
  242. data/maps/mvd-rus-Cyrl-Latn-2008.yaml +0 -109
  243. data/maps/mvd-rus-Cyrl-Latn-2010.yaml +0 -37
  244. data/maps/odni-ara-Arab-Latn-2015.yaml +0 -425
  245. data/maps/odni-aze-Cyrl-Latn-2015.yaml +0 -144
  246. data/maps/odni-bel-Cyrl-Latn-2015.yaml +0 -148
  247. data/maps/odni-bul-Cyrl-Latn-2015.yaml +0 -96
  248. data/maps/odni-che-Cyrl-Latn-2015.yaml +0 -169
  249. data/maps/odni-fas-Arab-Latn-2015.yaml +0 -406
  250. data/maps/odni-hin-Deva-Latn-2015.yaml +0 -258
  251. data/maps/odni-kat-Geor-Latn-2015.yaml +0 -87
  252. data/maps/odni-kaz-Cyrl-Latn-2015.yaml +0 -148
  253. data/maps/odni-kir-Cyrl-Latn-2015.yaml +0 -136
  254. data/maps/odni-kor-Hang-Latn-2015.yaml +0 -375
  255. data/maps/odni-mkd-Cyrl-Latn-2015.yaml +0 -122
  256. data/maps/odni-per-Arab-Latn-2015.yaml +0 -228
  257. data/maps/odni-rus-Cyrl-Latn-2015.yaml +0 -77
  258. data/maps/odni-srp-Cyrl-Latn-2015.yaml +0 -129
  259. data/maps/odni-tat-Cyrl-Latn-2015.yaml +0 -142
  260. data/maps/odni-tgk-Cyrl-Latn-2015.yaml +0 -148
  261. data/maps/odni-uig-Cyrl-Latn-2015.yaml +0 -138
  262. data/maps/odni-ukr-Cyrl-Latn-2015.yaml +0 -157
  263. data/maps/odni-urd-Arab-Latn-2015.yaml +0 -221
  264. data/maps/odni-uzb-Cyrl-Latn-2015.yaml +0 -166
  265. data/maps/royin-tha-Thai-Latn-1939-generic.yaml +0 -90
  266. data/maps/royin-tha-Thai-Latn-1968.yaml +0 -183
  267. data/maps/royin-tha-Thai-Latn-1999-chained.yaml +0 -180
  268. data/maps/royin-tha-Thai-Latn-1999.yaml +0 -80
  269. data/maps/sac-zho-Hans-Latn-1979.yaml +0 -24763
  270. data/maps/sasm-mon-Mong-Latn-general-1978.yaml +0 -389
  271. data/maps/sasm-mon-Mong-Latn-phonetic-1978.yaml +0 -354
  272. data/maps/ses-ara-Arab-Latn-1930.yaml +0 -283
  273. data/maps/stategeocadastre-ukr-Cyrl-Latn-1993.yaml +0 -222
  274. data/maps/ua-ukr-Cyrl-Latn-1996.yaml +0 -197
  275. data/maps/ua-ukr-Cyrl-Latn-2007.yaml +0 -75
  276. data/maps/ua-ukr-Cyrl-Latn-2010.yaml +0 -192
  277. data/maps/un-amh-Ethi-Latn-2016.yaml +0 -602
  278. data/maps/un-ara-Arab-Latn-1971.yaml +0 -139
  279. data/maps/un-ara-Arab-Latn-1972.yaml +0 -159
  280. data/maps/un-ara-Arab-Latn-2017.yaml +0 -420
  281. data/maps/un-bel-Cyrl-Latn-2007.yaml +0 -114
  282. data/maps/un-ben-Beng-Latn-2016.yaml +0 -534
  283. data/maps/un-ell-Grek-Latn-1987-phonetic.yaml +0 -780
  284. data/maps/un-ell-Grek-Latn-1987-tl.yaml +0 -31
  285. data/maps/un-ell-Grek-Latn-1987-ts.yaml +0 -19
  286. data/maps/un-hin-Deva-Latn-2016.yaml +0 -222
  287. data/maps/un-mar-Deva-Latn-2016.yaml +0 -91
  288. data/maps/un-mon-Mong-Latn-general-2013.yaml +0 -264
  289. data/maps/un-mon-Mong-Latn-phonetic-2013.yaml +0 -264
  290. data/maps/un-nep-Deva-Latn-1972.yaml +0 -350
  291. data/maps/un-nep-Deva-Latn-2013.yaml +0 -74
  292. data/maps/un-rus-Cyrl-Latn-1987.yaml +0 -166
  293. data/maps/un-ukr-Cyrl-Latn-1998.yaml +0 -53
  294. data/maps/un-ukr-Cyrl-Latn-2012.yaml +0 -162
  295. data/maps/var-hin-Deva-Latn-hunterian-1872.yaml +0 -221
  296. data/maps/var-jpn-Hrkt-Latn-hepburn-1886.yaml +0 -406
  297. data/maps/var-jpn-Hrkt-Latn-hepburn-1954.yaml +0 -386
  298. data/maps/var-kor-Hang-Hang-jamo.yaml +0 -11193
  299. data/maps/var-kor-Hang-Latn-mr-1939.yaml +0 -1054
  300. data/maps/var-kor-Kore-Hang-2013.yaml +0 -59754
  301. data/maps/var-kor-Kore-Latn-mr-1939.yaml +0 -36
  302. data/maps/var-mar-Deva-Latn-hunterian-1872.yaml +0 -43
  303. data/maps/var-mon-Mong-Latn-1930.yaml +0 -102
  304. data/maps/var-mon-Mong-Latn-lessing.yaml +0 -272
  305. data/maps/var-mon-Mong-Latn-vpmc.yaml +0 -274
  306. data/maps/var-pra-Deva-Latn-iast-1912.yaml +0 -30
  307. data/maps/var-san-Deva-Latn-iast-1912.yaml +0 -149
  308. data/maps/var-tha-Thai-Thai-phonemic.yaml +0 -59
  309. data/maps/var-tha-Thai-Zsym-ipa.yaml +0 -301
  310. data/maps/var-zho-Hani-Latn-wd-1979.yaml +0 -38912
  311. data/spec/interscript/filenames_spec.rb +0 -384
  312. data/spec/interscript/mapping_spec.rb +0 -42
  313. data/spec/interscript_spec.rb +0 -29
  314. data/spec/spec_helper.rb +0 -3
@@ -1,336 +0,0 @@
1
- ---
2
- authority_id: bgnpcgn
3
- id: 2007
4
- language: iso-639-3:prs # prs stands for Dari (https://iso639-3.sil.org/code/prs&_ga=GA1.2.2054538372.1574092823)
5
- source_script: Arab
6
- destination_script: Latn
7
- name: TRANSLITERATION SYSTEM FOR PERSIAN BGN/PCGN 1958 System
8
- url: https://github.com/interscript/interscript/files/5180821/BGN_Romanization_Guide_1964_persian_1958.pdf
9
- creation_date: 1958
10
- confirmation_date: 2017-11
11
- description: |
12
- The BGN/PCGN 1958 System for the Persian alphabet was
13
- adopted by the BGN in 1946 and by the PCGN In 1958. It Is
14
- used for the romanization of standard geographic names in
15
- Iran.
16
- The Persian alphabet is the same as the Arabic alphabet
17
- except for the addition of four consonant symbols for
18
- sounds which do not occur in Arabic. Therefore, the same
19
- conversion values are used for the Persian alphabet as for
20
- the Arabic alphabet wherever phonetically valid. Where
21
- letters common to the two alphabets have different
22
- pronunciation in the two languages, conversion values
23
- reflecting the Persian pronunciation are provided in the
24
- Persian system.
25
- It may be noted that neither the system of pointing nor the
26
- conversion values for vowels and diphthongs are the same
27
- for Persian as for Arabic.
28
- Persian presents the same problems of vowel pointing as
29
- Arabic in that the short vowel symbols necessary for the
30
- proper rendering of short vowels, long vowels, and
31
- diphthongs are almost always omitted from written Persian.
32
- It follows that, in order to produce transliter- tions in
33
- terms of standard written Persian, the transliterator must
34
- be able to identify the words used in names and must know
35
- their standard written Persian spelling, their proper vowel
36
- pointing, and how to eliminate pecularities due to
37
- dialectical variation.
38
- The notes and special rules explain details of
39
- transliteration not stated in the tables.
40
-
41
- notes:
42
- - |
43
- 1)The Persian writing system, in its generally used form,
44
- employs only the symbols found in Table I, and the alef maddeh
45
- (آ) of Table II. The symbols in column 1 of Table II are
46
- traditional auxiliary symbols used by Persians only
47
- sporadically to indicate the exact reading of a given word.
48
- In the case of i, ū, ey and ow, a choice of symbology
49
- exists, one system adhering to the Arabic tradition, the
50
- other being a modification of it. Likewise, there are two
51
- ways of writing alef maq§ureh. The BGN/PCGN transliteration
52
- system presupposes forms fully pointed with the Persian
53
- symbols represented in Table II, though these are omitted
54
- from the examples given below.
55
-
56
- - 2) Alef ( أ ) occurs with the following uses
57
- a. Initially, it indicates that the word begins with a vowel or
58
- diphthong, and the alef itself is not transliterated, e.g.,
59
- انجيرة Anjīreh, ايواني Eyvānī
60
- b. Initially with maddeh ( آ ),it indicates ā, e.g., آبادان Ābādān.
61
- c. Medially and finally. it represents ā, e.g., e.g., آبادان Ābādān,
62
- توكا Tūkā.
63
- d. With hamzeh. See Note 5.
64
-
65
-
66
- - 3) Where special considerations are paramount, the sub-dot
67
- may be used in place of the cedilla
68
-
69
- - 4) The two-letter symbols kh, zh, sh, and gh are convenient
70
- for use and easily comprehensible. The infrequent sequences
71
- of kāf, ze, sīn, and gāf followed by he can be unequivocally
72
- transliterated for bibliographical purposes by the use of a
73
- slant line (“shilling,” “solidus") to separate true h from
74
- a preceding k, z, s, or g; that is, kh represents khe, but
75
- k/h stands for kāf followed by he.
76
-
77
- - 5) Hamzeh (ء) is not regarded as a letter of the Persian
78
- alphabet, but as a diacritic mark, and as such is not
79
- always expressed in actual writing. In fully pointed words,
80
- however, it appears in several graphic forms, standing
81
- alone or written in conjunction with alef, vav, or ye (the
82
- ye in this instance being undotted). All these forms are
83
- transliterated simply with the apostrophe in the form
84
- resembling a small raised figure 9 (’) ,e.g., جزء Joz’
85
- صفراء şafrā’, مأخذ ma’khaz̄, مؤتمن mu’taman, پائين pā’īn Occasionally a word may
86
- appear pointed according to the strict Arabic tradition so
87
- as to indicate an initial hamzeh. This initial hamzeh is
88
- never transliterated, but only the vowel which it carries,
89
- e.g., •Jfi , whether pointed or 0 . is "transliterated
90
- simply Anjireh. ' Hamzeh is also sometimes written over
91
- final he or ye to represent the -ye form of the eg&feh, cf.
92
- Note 8.
93
-
94
- - 6) Alef maddeh is used initially to indicate ā, e.g., آبادان Ābādān
95
- Noninitially it indicates ’ā in words of Arabic origin,
96
- and must be so transliterated, e.g., قرآن Qor’ān, مآب ma’āb
97
-
98
- - 7) Tashdid ( ّ) indicates doubling of the consonant over which
99
- it is written and is represented in transliteration by writing
100
- the consonant twice, e.g محمّد Mohammad The sequence kasreh ye ye
101
- is transliterated īy.In names of Arabic origin containing the
102
- definite article, the vowel of the article is transliterated according
103
- to its Persian pronunciation and the lam, when followed by a “sun letter”
104
- (t, s̄, d, z̄, r, s, sh, ẕ, ţ, z̧, ţ, z̧, l, n) is assimilated. The article
105
- is written in lower case and separate from the preceding and following word,
106
- e.g., Zeyn od Din, but *£4 . Zeyn ed Dīn. Cf. Special Rule 1.
107
-
108
- - 8) The relational (ezafeh) suffix is transliterated -e after final consonants
109
- (except for silent h). After silent h and after vowels, it is transliterated
110
- -ye. It is usually not expressed in Persian writing after a consonant
111
- (kasreh being understood), e.g., كوهِ مَرغٌوب Kuh-e Marghūb. After final alef or vav
112
- it is written with ye (ي), e.g., بايِ آب Pa-ye Ab, جويِ آس Jū-ye Ās. After ye (ي)
113
- and silent he it is written as hamzeh over the letter, e.g., دَهَانهٴ مَمبَر Dahāneh-ye Mambar,
114
- سَلَيٴ بُذٌرگ Salasi-ye Bozorrg.
115
-
116
-
117
-
118
- - 1. In Persian names of Arabic origin, the word division
119
- used for transliterating Arabic will obtain, except that
120
- names ending in the word Allah will be written solid and
121
- the a of Allah will be replaced by o, e.g., The Arabic
122
- definite article when not subject to assimilation will be
123
- written al in name-initial position but usually, ol
124
- elsewhere, e.g., Al JJal but 2u ol Faqar. Cf. Note 7 above.
125
-
126
- - 2. In Persian names in general, in sequences of name
127
- elements pronounced as a single unit, division into
128
- separate words will be made after Persian letters written
129
- in the word final form. (But see the Rule immediately
130
- below.)
131
-
132
- - 3. The word abad which occurs very frequently at
133
- the end of place names will be written solid with the
134
- preceding word; e.g., Allahabad, not Allah Abad.
135
-
136
- - 4. Persian derivational endings such as vand and Turkish and other
137
- endings such as lar, li and lu will be written solid with
138
- the preceding word, whether so written in Persian script or
139
- not.
140
-
141
- - 5. The letter he, when used in Turkish fashion for
142
- word internal e, will be transliterated eh as usual but
143
- will be written solid with the remainder of the word.
144
-
145
- - 6. Kheplus vdv followed by long vowel or khe plus vdv followed
146
- by gammeh will be rendered khv although the v is not
147
- pronounced.
148
-
149
- tests:
150
-
151
- - source: اَنجِيرة
152
- expected: Anjīreh
153
-
154
- - source: اِيْوَانِي
155
- expected: Eyvānī
156
-
157
- - source: آبادان
158
- expected: Ābādān
159
-
160
- - source: تُوكا
161
- expected: Tūkā
162
-
163
- - source: آبادان
164
- expected: Ābādān
165
-
166
- - source: قُرآن
167
- expected: Qor’ān
168
-
169
- - source: مَآب
170
- expected: Ma’āb
171
-
172
- - source: مُحَمَّد
173
- expected: Moḩammad
174
-
175
- - source: كُوهِ مَرغُوب
176
- expected: Kūh-e Marghūb
177
-
178
- - source: پَايِ آب
179
- expected: Pā-ye Āb
180
-
181
- - source: جُويِ آس
182
- expected: Jū-ye Ās
183
-
184
- - source: دَهَانِهٴ مَمبَر
185
- expected: Dahāneh-ye Mambar
186
-
187
- - source: سَلَسِيٴ بُذُرگ
188
- expected: Salasī-ye Boz̄org
189
-
190
- - source: عَبداللَّه
191
- expected: ‘Abdollāh
192
-
193
- - source: ذُو الفَقَار
194
- expected: Z̄ū ol Faqār
195
-
196
- - source: اللَّه آبَاد
197
- expected: Allāhābād
198
-
199
- map:
200
- postrules:
201
- - pattern: (?<=\b)(?<!\b[‘|’|'|-])[\u0061-\uFFFF]
202
- result: "upcase"
203
-
204
- - pattern: " Ol"
205
- result: " ol"
206
-
207
- characters:
208
-
209
- '\s\u0622\u0628\u064E\u0627\u062F' : 'ābād' # Special Rule 3
210
-
211
- '\u064e(?=\u0629)' : '' # َ fatha followed by ta' marboota
212
- '\u064e(?=a[h|t])' : '' # َ fatha followed by ta' marboota, handling different order of conversion
213
-
214
- # pointing
215
- '\u064e' : 'a' # َ fatha
216
- '\u0650' : 'e' # ِ kasra
217
- '\u064f' : 'o' # ُ damma
218
- '\u064e\u0627' : 'ā' # ـَا fatha followed by ا
219
- '\u0649\u0670' : 'á' # ىٰ
220
- '\u0622' : '’ā' # آ
221
- '\b\u0622' : 'ā' # آ
222
- '\u0650[\u064a|\u06cc]' : 'ī' # ـِي kasra followed by ي
223
- # '\u0650\u06cc' : 'ī' # ـِي kasra followed by ي
224
- '\u064f\u0648' : 'ū' # ـُو damma followed by و
225
- '\u064e[\u064a|\u06cc]\u0652' : 'ey' # ـَيْ
226
- '\u0650[\u064a|\u06cc]\u0652' : 'ey' # ـِيْ
227
- '\u064e\u0648' : 'ow' # ـَو
228
- '\u0652' : '' # ْ sokoon
229
- '\u0650\u064a\u0651' : 'īy' # ـِيّ
230
- '[\u0654|\u0674]' : '-e' # ٴ ezafeh
231
- '(?<=[\u064a|\u0647])[\u0654|\u0674]' : '-ye' # ٴ ezafeh
232
- '\u0650\b' : '-e' # ِ kasra
233
- '[\u064a|\u06cc]\u0650\b' : '-ye' # ِ kasra
234
- # shadda
235
-
236
- '\u0628\u0651' : 'bb' # ب
237
- '\u062a\u0651' : 'tt' # ت
238
- '\u062b\u0651' : 's̄s̄' # ث
239
- '\u062c\u0651' : 'jj' # ج
240
- '\u062d\u0651' : 'ḩḩ' # ح
241
- '\u062e\u0651' : 'kh' # خ
242
- '\u062f\u0651' : 'dd' # د
243
- '\u0630\u0651' : 'z̄z̄' # ذ
244
- '\u0631\u0651' : 'rr' # ر
245
- '\u0632\u0651' : 'zz' # ز
246
- '\u0633\u0651' : 'ss' # س
247
- '\u0634\u0651' : 'sh' # ش
248
- '\u0635\u0651' : 'şş' # ص
249
- '\u0636\u0651' : 'ẕẕ' # ض
250
- '\u0637\u0651' : 'ţţ' # ط
251
- '\u0638\u0651' : 'z̧z̧' # ظ
252
- '\u063a\u0651' : 'gh' # غ
253
- '\u0641\u0651' : 'ff' # ف
254
- '\u0642\u0651' : 'qq' # ق
255
- '\u0643\u0651' : 'kk' # ك
256
- '\u0644\u0651' : 'll' # ل
257
- '\u0645\u0651' : 'mm' # م
258
- '\u0646\u0651' : 'nn' # ن
259
- '\u0647\u0651' : 'hh' # ه
260
- '\u0648\u0651' : 'vv' # و
261
- '\u064a\u0651' : 'yy' # ي
262
-
263
- '\u0659': 'ê'
264
-
265
- # ta' marboota
266
- '\u0629' : 'eh'
267
-
268
- '\b\u0627\u0644' : 'al ' # ال
269
- '\s\b\u0627\u0644' : ' ol ' # ال #special Rule 1
270
- '\ufdf2': 'Allāh' # See note 5
271
- '\u0627\u0644\u0644\u0651\u064e\u0647' : "Allāh"
272
- '(?<!\b)\u0627\u0644\u0644\u0651\u064e\u0647' : "ollāh" # Special Rule 1
273
- # '\uFE8E' : '' # ﺎ
274
-
275
- # Sun letters
276
- '\b\u0627\u0644\u062a' : 'at t' # الت
277
- '\b\u0627\u0644\u062b' : 'as̄ s̄' # الث
278
- '\b\u0627\u0644\u062f' : 'ad d' # الد
279
- '\b\u0627\u0644\u0630' : 'az̄ z̄' # الذ
280
- '\b\u0627\u0644\u0631' : 'ar r' # الر
281
- '\b\u0627\u0644\u0632' : 'az z' # الز
282
- '\b\u0627\u0644\u0633' : 'as s' # الس
283
- '\b\u0627\u0644\u0634' : 'ash sh' # الش
284
- '\b\u0627\u0644\u0635' : 'aş ş' # الص
285
- '\b\u0627\u0644\u0636' : 'aẕ ẕ' # الض
286
- '\b\u0627\u0644\u0637' : 'aţ ţ' # الط
287
- '\b\u0627\u0644\u0638' : 'az̧ z̧' # الظ
288
- '\b\u0627\u0644\u0644' : 'al l' # الل
289
- '\b\u0627\u0644\u0646' : 'an n' # الن
290
-
291
-
292
- '\u0621': '’' # ء
293
- '\u0626': '’' # ئ
294
-
295
- '\u0623' : '' # أ
296
- '\u0625' : '' # إ
297
- '\u0627' : 'ā' # ا
298
- '\b\u0627' : '' # ا
299
-
300
- # consonant characters
301
-
302
- '\u0628' : 'b' # ب
303
- '\u067E' : 'p' # پ
304
- '\u062a' : 't' # ت
305
- '\u062B' : 's̄' # ث
306
- '\u062c' : 'j' # ج
307
- '\u0686' : 'ch' # ‫چ‬
308
- '\u062d' : 'ḩ' # ح
309
- '\u062e' : 'kh' # خ
310
- '\u062f' : 'd' # د
311
- '\u0630' : 'z̄' # ذ
312
- '\u0631' : 'r' # ر
313
- '\u0632' : 'z' # ز
314
- '\u0698' : 'zh' # ‫ژ‬
315
- '\u0633' : 's' # س
316
- '\u0634' : 'sh' # ش
317
- '\u0635' : 'ş' # ص
318
- '\u0636' : 'ẕ' # ض
319
- '\u0637' : 'ţ' # ط
320
- '\u0638' : 'z̧' # ظ
321
- '\u0639' : '‘' # ع
322
- '\u063a' : 'gh' # غ
323
- '\u0641' : 'f' # ف
324
- '\u0642' : 'q' # ق
325
- '\u0643' : 'k' # ك
326
- '\u06A9' : 'k' # ک
327
- '\u06AF' : 'g' # ‫گ‬
328
- '\u0644' : 'l' # ل
329
- '\u0645' : 'm' # م
330
- '\u0646' : 'n' # ن
331
- '\u0647' : 'h' # ه
332
- '\u0648' : 'v' # و
333
- '\u064a' : 'y' # ي
334
- '\u0649' : 'y' # ي
335
- '\u06D0' : 'ē' # ې
336
- '\u06CD' : 'êy' # ‫ۍ‬
@@ -1,639 +0,0 @@
1
- ---
2
- authority_id: bgnpcgn
3
- id: 2007
4
- language: iso-639-3:prs # prs stands for Dari (https://iso639-3.sil.org/code/prs&_ga=GA1.2.2054538372.1574092823)
5
- source_script: Arab
6
- destination_script: Latn
7
- name: BGN/PCGN NATIONAL ROMANIZATION SYSTEM FOR AFGHANISTAN -- BGN/PCGN 2007 System
8
- alias:
9
- ogc11122:
10
- code: uas_Arab2Latn_BGN_2007
11
- description: Unified Afghan Romanization System US Board on Geographic Names (BGN)/The Permanent Committee on Geographical Names (PCGN) 2007
12
- url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/693661/ROMANIZATION_FOR_AFGHANISTAN.pdf
13
- creation_date: 2007
14
- confirmation_date: 2017-11
15
- description: |
16
- This romanization system agreed by BGN and PCGN in November 2007,
17
- accommodates the linguistic complexity of Afghanistan as manifest in
18
- its geographical names.
19
-
20
- The following tabulation shows the original Perso-Arabic script with
21
- accompanying Unicode value (columns 1a and b), the Yaghoubi
22
- romanization (column 2), the BGN/PCGN romanization with accompanying
23
- Unicode value (columns 3a and b), an English phonetic example (column
24
- 4), and an example toponym (columns 5b and c).
25
-
26
- [The Yaghoubi romanization system was developed in 1959 by
27
- Muzaffarud Din Yaqubi (commonly seen as Yaghoubi). It is a native
28
- official system designed to reflect Afghan names, both Dari and Pashto,
29
- and both pronunciation and genuine linguistic truth.]
30
-
31
- The tables function as both a romanization system for Afghanistan (i.e.
32
- with access to the original script, these tables can be applied to get
33
- a standardized Roman result - moving from columns 1 to 3) and as a
34
- means of converting the available Yaghoubi Roman-script spellings, as
35
- appear on the Fairchild Aerial Surveys map series, to standard BGN/PCGN
36
- spellings (moving from columns 2 to 3).
37
-
38
- The points used in Arabic to mark short vowels and certain other
39
- diacritical marks are infrequently written in Afghanistan.
40
- Consequently, a reference source may sometimes be required to aid
41
- correct identification of the standard spellings and proper vowels and
42
- elimination of dialectal and idiosyncratic variations. In the interests
43
- of clarity, the example columns show script with vowel pointing from
44
- Arabic to indicate the short vowels that are included alongside the
45
- unpointed form that will usually be encountered. However it should be
46
- noted that the pronunciation of short vowels will vary.
47
-
48
- Note: it is recommended that a font such as Scheherazade, available
49
- from www.sil.org, which includes the Unicode extended Arabic sub-range,
50
- be used to view this system. [Please note that the identification of a
51
- particular font does not represent an endorsement of any specific
52
- product or manufacturer.]
53
-
54
- notes:
55
- - |
56
- Alif (ا) should be romanized as follows:
57
-
58
- a. Initially, it indicates that the word begins with a vowel or
59
- diphthong; the alif itself is not romanized, but rather the short vowel
60
- it “carries” is romanized; e.g., ميړ أَسَلم ژرَندَه → Mī Aslam Zhrandah
61
- b. When it carries a maddah (آ) (see vowel table, row 6), it represents ā; e.g., آب بَند → Āb Band.
62
- c. Medially and finally it represents ā (see vowel table, row 5); e.g., ماڼۍ → Māṉêy
63
- d. Medially and finally in words of Arabic origin, alif may serve as the bearer of hamzah, e.g. رأس → ra’s.
64
-
65
- - Occasionally the letter sequences سه ,زه ,که, and گه occur without
66
- intervening vowels. They may be romanized k·h, z·h, s·h, and g·h in
67
- order to differentiate these romanizations from the digraphs kh, zh,
68
- sh, and gh, which are used to represent the letters ش ,ژ ,خ, and غ.
69
- Additionally, the Pashto letters څ and ځ, routinely romanized ts and
70
- dz, may be alternatively romanized s and z تس when for special reasons
71
- it is desired that confusion be avoided with the character sequences
72
- (ts) and دز (dz), respectively.
73
-
74
- - "The vagaries of written Afghan languages, as pertains to spacing
75
- and word division, are addressed as follows:
76
- Spaces may be added to or subtracted from Afghan words written in
77
- Arabic script, for the purposes of standardization. This is
78
- particularly relevant when the words are hand-written, are rendered
79
- “art st cally”, or express other s ch non-standard flourishes, as long
80
- as the sense of the toponym, word, or phrase is not compromised.
81
- Romanized toponyms are typically divided into constituent words
82
- (spaces and other grammatical rules applied) when those words can stand
83
- independently, for purposes of standardization and minimization of
84
- confusion, particularly in situations where Afghan writers are
85
- inconsistent in their application of spacing and word breaks. When the
86
- Afghan word or suffix is only used in combination with other nouns or
87
- adjectives, then it should be appended to the preceding word in its
88
- romanization. This includes (but is not limited to) - ābā , -zaī, -zā
89
- ah, - ū, -wand, -gaī, -kaī, -pūr, - ēsh, -lar, -lī, -lū and ullāh, as,
90
- for example, seen in Raḩmatābād (رحمت آباد) and Raḩmatullāh (رحمت االله),
91
- but Raḩmat Khēl (رحمتخيل) and Raḩmat Shahr (رحمتشهر)."
92
-
93
- - The one-letter words د (Pashto) and و (Dari) are romanized dê and
94
- wa, respectively.
95
-
96
- - The word الله, meaning God, should always be romanized Allāh,
97
- except as specified in note 3. Note that the Unicode value FDF2 spells
98
- Allāh, but omits the alif in some common fonts, including Times New
99
- Roman. If in doubt, try in Arial Unicode MS to verify. Also note that
100
- the “dagger al f” ( ) above the second ل (lām) n the ord الله, is not
101
- written but should be romanized ā, like a full-size alif.
102
-
103
- - In names of Arabic origin, the l of the definite article al s ass m
104
- lated before the ‘s n letters’ , , , , r, z, s, sh, ş, ẕ, , z, l and n.
105
- In its romanization, the article should be separated from the name it
106
- precedes and should not be capitalized except at the beginning of a
107
- name, e.g. جبل السراج→ Jabal
108
- as Sarāj
109
-
110
- - In Arabic names, a shaddah, ّ is used to denote the doubling of a
111
- particular consonant character, e.g. ُم َح َمد → Muḩammad. Ho ever, n
112
- Pashto th s ‘do bl ng’ s freq ently om tted n both Perso- Arabic script
113
- and the resulting romanization. Guidance on doubling may be taken from
114
- an authoritative names source, such as an Afghan government source or
115
- Pashto dictionary; for example, it is usual to see Ḩājī without and
116
- ‘Abbās with the doubled consonant. The doubled y consonant is almost
117
- always retained, as in Sayyid or Qayyūm.
118
-
119
- - In Afghan names which contain an iẕāfah, it should be romanized as
120
- -e or –ye according to
121
- common pronunciation, but generally, -e is used if the preceding word
122
- ends with a consonant other
123
- than silent heh, and -ye if the preceding word ends with a vowel
124
- sound e.g. غر ِحصار → Ghar-e ِ
125
- Ḩ şār; َقل َع ٔه َنو → Qal‘ah-ye Now. Scholarly sources indicate that
126
- heh is silent in darah and qal‘ah (thus darah-ye, qal‘ah-ye), but
127
- lightly spoken in kōh and chāh (thus kōh-e, chāh-e).
128
-
129
- - The character sequence خو, where followed by ا or ی should be
130
- romanized khwā or khwī, although the w is either not pronounced, or
131
- only weakly so, as in خواجه → khwājah.
132
-
133
- - Plural nouns ending in -hā or -ān should always be romanized as a
134
- single word, regardless of whether a space appears in a Perso-Arabic
135
- script source.
136
-
137
- - Unicode values listed in the tables above are required to ensure
138
- standardization and to minimize confusion from competing
139
- representations of a given character. It should be noted that the
140
- Persian Unicode value 0643 or FEDA( ك Unicode value 06A9) is
141
- recommended rather than the Arabic( ک or FED9), the Persian گ (Unicode
142
- value 06AF) is recommended rather than ګ (Unicode value 06AB) or ڰ
143
- (Unicode value 06B0) or ك (Unicode value 0643 or FEDA or FED9), and the
144
- Pashto character ځ (Unicode value 0681) is recommended rather than the
145
- heh with a dot above and a dot below (no Unicode value). For the letter ی
146
- in its many variations, care must be exercised to follow this romanization
147
- guide's recommendations to eliminate confusion for search engines
148
- and software. BGN/PCGN does not use the Unicode encoding FEEF for the
149
- character ی in any Afghan word.
150
-
151
- - |
152
- An inventory of letter-diacritic combinations in addition to the
153
- unmodified letters of the basic Roman script is:
154
-
155
- ‘ (U+2018)
156
- Ā (U+0100)
157
- Á (U+00C1)
158
- Ḏ (U+0044+0031)
159
- Ē (U+9112)
160
- Ê (U+00CA)
161
- Ḩ (U+1E28)
162
- Ī (U+012A)
163
- N-bar-top (U+004E+0304)
164
- Ō (U+014C)
165
- R-bar-bottom (U+0052+0031)
166
- Ş (U+015E)
167
- S-bar-top (U+0053+0304)
168
- Ṯ (U+0054+0031)
169
- Ţ (U+0162)
170
- Ū (U+918A)
171
- Z-comma-bottom (U+005A+0327)
172
- Z-bar-top (U+005A+0304)
173
- Ẕ (U+005A+0331)
174
- ẔH (U+005A+0048+035F)
175
-
176
-
177
- ʼ (U+2019)
178
- ā (U+0101)
179
- á (U+00E1)
180
- ḏ (U+0064+00031)
181
- ē (U+0113)
182
- ê (U+00EA)
183
- ḩ (U+1E29)
184
- ī (U+912B)
185
- n-bar-top (U+004E+0304)
186
- ō (U+014D)
187
- r-bar-bottom (U+0072+0031)
188
- ş (U+015F)
189
- s-bar-top (U+0073+0304)
190
- ṯ (U+0074+0031)
191
- ţ (U+0163)
192
- ū (U+918B)
193
- z-comma-bottom (U+007A+0327)
194
- z-bar-top (U+007A+0304)
195
- ẕ (U+007A+0331)
196
- zh-under-bar (U+007A+0068+035F)
197
-
198
-
199
- - The Romanization columns show only lowercase forms but, when
200
- romanizing, uppercase and lowercase Roman letters as appropriate should
201
- be used.
202
-
203
-
204
- tests:
205
- - source: بَغْلان
206
- expected: baghlān
207
-
208
- - source: پُوټَكَى
209
- expected: pōṯakay
210
-
211
- - source: شِيرِين تَگَاب
212
- expected: shīrīn tagāb
213
-
214
- - source: کُوْټ
215
- expected: kōṯ
216
-
217
- - source: ثَابِر
218
- expected: s̄ābir
219
-
220
- - source: جَلال آبَاد
221
- expected: jalālābād
222
-
223
- - source: چَارِيكَار
224
- expected: chārīkār
225
-
226
- - source: ځَدْرَاڼ
227
- expected: dzadrāṉ
228
-
229
- - source: څَوکۍ
230
- expected: tsowkêy
231
-
232
- - source: حَضْرَتِ إِمَام
233
- expected: ḩaẕrat-e imām
234
-
235
- - source: خُوْسْت
236
- expected: khōst
237
-
238
- - source: سْپِين بُوْلْدَک
239
- expected: spīn bōldak
240
-
241
- - source: ډَنْډ وَ پَتَان
242
- expected: ḏanḏ wa patān
243
-
244
- # - source: گُذَرْگَاهٔ نور
245
- # expected: guz̄argāh-e nūr
246
-
247
- - source: كَنْدَهَار
248
- expected: kandahār
249
-
250
- - source: أَنْدَړ
251
- expected: andaṟ
252
-
253
- - source: كُنْدُز
254
- expected: kunduz
255
-
256
- - source: مِير أَسْلَم ژْرَنْدَه
257
- expected: mīr aslam zhrandah
258
-
259
- - source: ږِيرَه
260
- expected: z͟hīrah
261
-
262
- - source: سَمَنْگَان
263
- expected: samangān
264
-
265
- # - source: مَزَارِ شَريف
266
- # expected: mazār-e sharīf
267
-
268
- - source: كښٙتَه كَلا
269
- expected: ks͟hêtah kalā
270
-
271
- - source: قَيْصَار
272
- expected: qayşār
273
-
274
- - source: فَيض آبَاد
275
- expected: faīẕābād
276
-
277
- - source: حَضْرَتِ سُلْطَان
278
- expected: ḩaẕrat-e sulţān
279
-
280
- - source: ظَاهِر كَلا
281
- expected: z̧āhir kalā
282
-
283
- - source: پُلِ عَلَم
284
- expected: pul-e ‘alam
285
-
286
- - source: غَزْنِي
287
- expected: ghaznī
288
-
289
- - source: مَزَارِ شَرِيف
290
- expected: mazār-e sharīf
291
-
292
- - source: قَيْصَار
293
- expected: qayşār
294
-
295
- - source: كَنْدَهَار
296
- expected: kandahār
297
-
298
- - source: گَرْدېز
299
- expected: gardēz
300
-
301
- - source: کَابُل
302
- expected: kābul
303
-
304
- - source: مَيمَنَه
305
- expected: maīmanah
306
-
307
- - source: خَان آبَاد
308
- expected: khānābād
309
-
310
- - source: مَاڼۍ
311
- expected: māṉêy
312
-
313
- - source: وَاخَان
314
- expected: wākhān
315
-
316
- # - source: هِرَات
317
- # expected: herāt
318
-
319
- - source: يَنْگِي قَلعَه
320
- expected: yangī qal‘ah
321
-
322
- - source: جَلال آبَاد
323
- expected: jalālābād
324
-
325
- # - source: هِرات پُلِ حِصَار
326
- # expected: Herāt Pul-e Ḩişār
327
-
328
- - source: مُرْغَاب کَابُل
329
- expected: murghāb kābul
330
-
331
- - source: گٙردُون
332
- expected: gêrdōn
333
-
334
- - source: آب بَنْد
335
- expected: āb band
336
-
337
- - source: سْپِين بُوْلْدَک
338
- expected: spīn bōldak
339
-
340
- # - source: بَالا بُلُوک
341
- # expected: Bālā Bulūk
342
-
343
- - source: جَوزجَان
344
- expected: jowzjān
345
-
346
- # - source: غَزْنِى سْپِين
347
- # expected: ghaznī spīn
348
-
349
- # - source: ريگ مَيوَنْد
350
- # expected: Maywand, Rēg
351
-
352
- - source: گَرْدېز
353
- expected: gardēz
354
-
355
- - source: مَیدان شَهْر
356
- expected: maīdān shahr
357
-
358
- - source: ډَنْډِ سُفْلىٰ
359
- expected: ḏanḏ-e suflá
360
-
361
- # - source: څَوْکۍ
362
- # expected: Tsowkêy
363
-
364
- # - source: هَوائِي ډَگَر
365
- # expected: hawā’ī ḏagar
366
-
367
- # - source: مَزارِ شَريف
368
- # expected: mazār-e sharīf
369
-
370
- # - source: دايکندی
371
- # expected: dāykundī
372
-
373
- # - source: زيارت
374
- # expected: Zīārat
375
-
376
- # - source: غوريان
377
- # expected: Ghōriyān
378
-
379
- # - source: ميا
380
- # expected: Myā
381
-
382
- - source: جَبَل السَرَاج
383
- expected: jabal as sarāj
384
-
385
- map:
386
- characters:
387
-
388
- # word-medial or word-final form where so appearing in a word.
389
- # '\u0627': '-'
390
-
391
- # # Vowel, Diphthong and Diacritical Characters
392
-
393
- # '\u064E': 'a'
394
-
395
- # # Both e and i are available to romanize this short vowel,
396
- # # depending on local usage and/or root language. In cases where the sound
397
- # # is uncertain, i is the default romanization in BGN/PCGN standardization
398
- # # procedures.
399
- # '\u0650':
400
- # - 'e'
401
- # - 'i'
402
-
403
- # # Both o and u are available to romanize this short vowel,
404
- # # depending on local usage and/or root language. In cases where the sound
405
- # # is uncertain, u is the default romanization in BGN/PCGN standardization
406
- # # procedures.
407
- # '\u064F':
408
- # - 'o'
409
- # - 'u'
410
- # '\u0659': 'ê'
411
-
412
- # # An alif with mad ( آ ) is written only in the initial position by
413
- # # BGN/PCGN standardization procedures, in keeping with Persian language
414
- # # family standards of use of the Arabic alphabet. The same letter written
415
- # # in a medial or final position is written . . .
416
- # '\u0622': 'ā'
417
-
418
- # pending issue #442
419
- # '\u0648': 'ō'
420
- # '\u0648': 'ū'
421
- # '\u0648': 'ow'
422
- # '\u06CC': 'ī'
423
-
424
- # # Or 'ē'. The character ی should be romanized ay or ē according to
425
- # # its root language or local pronunciation. In case of uncertainty a
426
- # # reference source (such as the Fairchild Aerial Surveys map series, or a
427
- # # BGN/PCGN approved policy document/list of recommended spellings) should
428
- # # be consulted.
429
- # '\u06CC': 'ay'
430
- # '\u06D0': 'ē'
431
-
432
- # # Or 'aī'. Both the combination ay and aī are available to romanize
433
- # # this character according to its root language or local pronunciation.
434
- # # In cases where the sound is uncertain ay is the default romanization in
435
- # # BGN/PCGN standardization procedures
436
- # '\u06CC':
437
- # - 'ay'
438
- # - 'á'
439
- # '\u06CD': 'êy'
440
- # '\u0621': '’'
441
- # '\u0674':
442
- # - '-e'
443
- # - '-ye'
444
-
445
- # # Other Diacritical Marks and Language Conventions
446
-
447
- # '\u0627': 'āy'
448
-
449
- # '\u0648': 'w'
450
- # '\u0626': '’'
451
- # '\u06C0': ''
452
- # '\u0651': ''
453
-
454
-
455
- # special rules
456
-
457
- '\s(?=\u0622\u0628\u064E\u0627\u062F)': '' # space followed by abad is removed
458
- '\ufdf2': 'Allāh' # See note 5
459
-
460
- # pointing
461
- '\u064e' : 'a' # َ fatha
462
- '\u064e(?=\u0629)' : '' # َ fatha followed by ta' marboota
463
- '\u064e(?=a[h|t])' : '' # َ fatha followed by ta' marboota, handling different order of conversion
464
-
465
- # Both e and i are available to romanize this short vowel,
466
- # depending on local usage and/or root language. In cases where the sound
467
- # is uncertain, i is the default romanization in BGN/PCGN standardization
468
- # procedures.
469
- '\u0650':
470
- - 'i'
471
- - 'e'
472
- '\u0650\b' : '-e' # ِ kasra
473
-
474
- # Both o and u are available to romanize this short vowel,
475
- # depending on local usage and/or root language. In cases where the sound
476
- # is uncertain, u is the default romanization in BGN/PCGN standardization
477
- # procedures.
478
- '\u064f': # ُ damma
479
- - 'u'
480
- - 'o'
481
-
482
- '\u0652' : '' # ْ sokoon
483
- '\u0659': 'ê'
484
-
485
- # special pointed letters
486
- '\u0639\u064e' : '‘a' # عَ
487
- '\u0639\u0650' : '‘i' # عِ
488
- '\u0639\u064f' : '‘ū' # عُ
489
- # handle MacOS regex difference
490
- '\u0639\u064f\u0648' : '‘ū' # عُو damma followed by و
491
-
492
- '\u0650\u064a' : 'ī' # ـِي kasra followed by ي
493
- '\u0650\u06cc' : 'ī' # ـِي kasra followed by ي
494
- '\u0650\u064a\u0651\u064e' : 'īy' # ـِيَّ
495
- '\u0650\u064a(?=\u064e|u064f)' : 'iy' # ـِي kasra followed by ي
496
- '\u064f\u0648' : 'ō' # ـُو damma followed by و
497
- '\u064e\u0627' : 'ā' # ـَا fatha followed by ا
498
- '\u064e\u0649' : 'ay' # ـَى fatha followed by ى which is ا not ي
499
- '\u064e\u0648\u0652' : 'aw' # ـَوْ
500
- '\u064e\u0648' : 'ow' # ـَو
501
- '\u064e\u064a\u0652' : 'ay' # ـَيْ
502
- '\u0650\u06cc\u0651\u064e' : 'īy' # ـِيَّ
503
- '\u064e\u064a' : 'aī' # ـَي
504
- '\u064e\u06cc' : 'aī' # ـَي
505
- '\u0649\u0670': 'á' # ىٰ
506
- '\u0674': '-e' # ٴ
507
- '\u0654': '-e' # ٔ
508
- # - '-ye'
509
-
510
- # An alif with mad ( آ ) is written only in the initial position by
511
- # BGN/PCGN standardization procedures, in keeping with Persian language
512
- # family standards of use of the Arabic alphabet. The same letter written
513
- # in a medial or final position is written . . .
514
- '\u0622' : 'ā' # آ
515
-
516
- # ta' marboota
517
- '\u0629' : 'at' # ة in the middle of the sentence
518
- '\u0629$' : 'ah'
519
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{2})\u0629' : 'ah'
520
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{3})\u0629' : 'ah'
521
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{4})\u0629' : 'ah'
522
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{5})\u0629' : 'ah'
523
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{6})\u0629' : 'ah'
524
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{7})\u0629' : 'ah'
525
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{8})\u0629' : 'ah'
526
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{9})\u0629' : 'ah'
527
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{10})\u0629' : 'ah'
528
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{11})\u0629' : 'ah'
529
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{12})\u0629' : 'ah'
530
- '(?<=\b\u0627\u0644[\u0600-\u06ff]{13})\u0629' : 'ah'
531
-
532
- # shadda
533
-
534
- '\u0628\u0651' : 'bb' # ب
535
- '\u062a\u0651' : 'tt' # ت
536
- '\u062b\u0651' : 'thth' # ث
537
- '\u062c\u0651' : 'jj' # ج
538
- '\u062d\u0651' : 'ẖẖ' # ح
539
- '\u062e\u0651' : 'khkh' # خ
540
- '\u062f\u0651' : 'dd' # د
541
- '\u0630\u0651' : 'z̄z̄' # ذ
542
- '\u0631\u0651' : 'rr' # ر
543
- '\u0632\u0651' : 'zz' # ز
544
- '\u0633\u0651' : 'ss' # س
545
- '\u0634\u0651' : 'sh' # ش
546
- '\u0635\u0651' : 'şş' # ص
547
- '\u0636\u0651' : 'ḏḏ' # ض
548
- '\u0637\u0651' : 'ţţ' # ط
549
- '\u0638\u0651' : 'z̧z̧' # ظ
550
- '\u063a\u0651' : 'ghgh' # غ
551
- '\u0641\u0651' : 'ff' # ف
552
- '\u0642\u0651' : 'qq' # ق
553
- '\u0643\u0651' : 'kk' # ك
554
- '\u0644\u0651' : 'll' # ل
555
- '\u0645\u0651' : 'mm' # م
556
- '\u0646\u0651' : 'nn' # ن
557
- '\u0647\u0651' : 'hh' # ه
558
- '\u0648\u0651' : 'ww' # و
559
- '\u064a\u0651' : 'yy' # ي
560
-
561
-
562
- '\u0621': '’' # ء
563
- '\u0626': '’' # ئ
564
-
565
- '\u0623' : '' # أ
566
- '\u0625': '' # إ
567
- '\u0627' : 'ā' # ا
568
-
569
- # See note B
570
- '\b\u0627\u0644' : 'al ' # ال
571
- # '\uFE8E' : '' # ﺎ
572
-
573
- # Sun letters
574
- '\b\u0627\u0644\u062a' : 'at t' # الت
575
- '\b\u0627\u0644\u062b' : 'as̄ s̄' # الث
576
- '\b\u0627\u0644\u062f' : 'ad d' # الد
577
- '\b\u0627\u0644\u0630' : 'az̄ z̄' # الذ
578
- '\b\u0627\u0644\u0631' : 'ar r' # الر
579
- '\b\u0627\u0644\u0632' : 'az z' # الز
580
- '\b\u0627\u0644\u0633' : 'as s' # الس
581
- '\b\u0627\u0644\u0634' : 'ash sh' # الش
582
- '\b\u0627\u0644\u0635' : 'aş ş' # الص
583
- '\b\u0627\u0644\u0636' : 'aẕ ẕ' # الض
584
- '\b\u0627\u0644\u0637' : 'aţ ţ' # الط
585
- '\b\u0627\u0644\u0638' : 'az̧ z̧' # الظ
586
- '\b\u0627\u0644\u0644' : 'al l' # الل
587
- '\b\u0627\u0644\u0646' : 'an n' # الن
588
-
589
-
590
- # consonant characters
591
-
592
- '\u0628' : 'b' # ب
593
- '\u067E': 'p' # پ
594
- '\u062a' : 't' # ت
595
- '\u067C': 'ṯ' # ټ
596
- '\u062B': 's̄' # ث
597
- '\u062c' : 'j' # ج
598
- '\u0686': 'ch' # ‫چ‬
599
-
600
- # # The variant form ج is seen infrequently and does not have a
601
- # # single Unicode encoding.
602
- '\u0681': 'dz' # Note 2 # ‫ځ‬
603
-
604
- '\u0685': 'ts' # Note 2 # ‫څ
605
-
606
- '\u062d' : 'ḩ' # ح
607
- '\u062e' : 'kh' # خ
608
- '\u062f' : 'd' # د
609
- '\u0689' : 'ḏ' # ‫ډ‬
610
- '\u0630' : 'z̄' # ذ
611
- '\u0631' : 'r' # ر
612
- '\u0693' : 'ṟ' # ړ
613
- '\u0632' : 'z' # ز
614
- '\u0698' : 'zh' # ‫ژ‬
615
- '\u0696' : 'z͟h' # ږ
616
- '\u0633' : 's' # س
617
- '\u069A' : 's͟h' # ښ
618
- '\u0634' : 'sh' # ش
619
- '\u0635' : 'ş' # ص
620
- '\u0636' : 'ẕ' # ض
621
- '\u0637' : 'ţ' # ط
622
- '\u0638' : 'z̧' # ظ
623
- '\u0639' : '‘' # ع
624
- '\u063a' : 'gh' # غ
625
- '\u0641' : 'f' # ف
626
- '\u0642' : 'q' # ق
627
- '\u0643' : 'k' # ك
628
- '\u06A9' : 'k' # ک
629
- '\u06AF' : 'g' # ‫گ‬
630
- '\u0644' : 'l' # ل
631
- '\u0645' : 'm' # م
632
- '\u0646' : 'n' # ن
633
- '\u06BC' : 'ṉ' # ڼ
634
- '\u0647' : 'h' # ه
635
- '\u0648' : 'w' # و
636
- '\u064a' : 'y' # ي
637
- '\u0649' : 'y' # ي
638
- '\u06D0' : 'ē' # ې
639
- '\u06CD' : 'êy' # ‫ۍ‬