en_IN.sor 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # format: USD 20.25 -> twenty dollars and twenty-five cents
  2. __numbertext__
  3. ^0 zero
  4. 1 one
  5. 2 two
  6. 3 three
  7. 4 four
  8. 5 five
  9. 6 six
  10. 7 seven
  11. 8 eight
  12. 9 nine
  13. 10 ten
  14. 11 eleven
  15. 12 twelve
  16. 13 thirteen
  17. 15 fifteen
  18. 18 eighteen
  19. 1(\d) $1teen
  20. 20 twenty
  21. 2(\d) twenty-$1
  22. 30 thirty
  23. 3(\d) thirty-$1
  24. 40 forty
  25. 4(\d) forty-$1
  26. 50 fifty
  27. 5(\d) fifty-$1
  28. 80 eighty
  29. 8(\d) eighty-$1
  30. (\d)0 $1ty
  31. (\d)(\d) $1ty-$2
  32. # separator function
  33. :0+ # one million
  34. :0*\d?\d " and" # one million and twenty-two
  35. :\d+ , # one million, one thousand
  36. (\d)(\d\d) $1 hundred$(:\2) $2
  37. (\d{1,2})([1-9]\d\d) $1 thousand $2 # ten thousand two hundred
  38. (\d{1,2})(\d{3}) $1 thousand$(:\2) $2 # one hundred thousand, two hundred
  39. (\d{1,2})(000\d\d) $1 lakh$(:\2) $2 # one lakh and two
  40. (\d{1,2})(\d{5}) $1 lakh $2 # one lakh two hundred
  41. (\d{1,4})(\d{7}) $1 crore$(:\2) $2
  42. # negative number
  43. [-−](\d+) negative |$1
  44. # decimals
  45. 0[.,] point
  46. ([-−]?\d+)[.,] $1| point
  47. ([-−]?\d+[.,]\d*)(\d) $1| |$2
  48. # currency
  49. # unit/subunit singular/plural
  50. us:([^,]*),([^,]*),([^,]*),([^,]*) \1
  51. up:([^,]*),([^,]*),([^,]*),([^,]*) \2
  52. ss:([^,]*),([^,]*),([^,]*),([^,]*) \3
  53. sp:([^,]*),([^,]*),([^,]*),([^,]*) \4
  54. AUD:(\D+) $(\1: Australian dollar, Australian dollars, cent, cents)
  55. BGN:(\D+) $(\1: lev, leva, stotinka, stotinki)
  56. BWP:(\D+) $(\1: pula, pula, thebe, thebe)
  57. CAD:(\D+) $(\1: Canadian dollar, Canadian dollars, cent, cents)
  58. CHF:(\D+) $(\1: Swiss franc, Swiss francs, centime, centimes)
  59. CNY:(\D+) $(\1: Chinese yuan, Chinese yuan, fen, fen)
  60. CZK:(\D+) $(\1: Czech koruna, Czech koruny, halér, halére)
  61. EEK:(\D+) $(\1: kroon, kroonid, sent, senti)
  62. EUR:(\D+) $(\1: euro, euro, cent, cents)
  63. GBP:(\D+) $(\1: pound sterling, pounds sterling, penny, pence)
  64. GHS:(\D+) $(\1: Ghana cedi, Ghana cedis, pesewa, pesewas)
  65. GMD:(\D+) $(\1: dalasi, dalasi, butut, bututs)
  66. HKD:(\D+) $(\1: Hong Kong dollar, Hong Kong dollars, cent, cents)
  67. HRK:(\D+) $(\1: kuna, kuna, lipa, lipa)
  68. HUF:(\D+) $(\1: forint, forint, fillér, fillér)
  69. INR:(\D+) $(\1: Indian rupee, Indian rupees, paisa, paise)
  70. JMD:(\D+) $(\1: Jamaica dollar, Jamaica dollars, cent, cents)
  71. JPY:(\D+) $(\1: Japanese yen, Japanese yen, sen, sen)
  72. KES:(\D+) $(\1: Kenyan shilling, Kenyan shillings, cent, cents)
  73. LRD:(\D+) $(\1: Liberian dollar, Liberian dollars, cent, cents)
  74. LSL:(\D+) $(\1: loti, maloti, sente, lisente)
  75. LTL:(\D+) $(\1: litas, litai, centas, centai)
  76. LVL:(\D+) $(\1: lats, lati, santims, santimi)
  77. MGA:(\D+) $(\1: ariary, ariaries, iraimbilanja, iraimbilanja)
  78. MUR:(\D+) $(\1: Mauritian rupee, Mauritian rupees, cent, cents)
  79. MXN:(\D+) $(\1: Mexican peso, Mexican pesos, centavo, centavos)
  80. MWK:(\D+) $(\1: Malawian kwacha, Malawian kwacha, tambala, tambala)
  81. NAD:(\D+) $(\1: Namibian dollar, Namibian dollars, cent, cents)
  82. NGN:(\D+) $(\1: naira, naira, kobo, kobo)
  83. NZD:(\D+) $(\1: New Zealand dollar, New Zealand dollars, cent, cents)
  84. PGK:(\D+) $(\1: kina, kina, toea, toea)
  85. PHP:(\D+) $(\1: Philippine peso, Philippine pesos, centavo, centavos)
  86. PKR:(\D+) $(\1: Pakistani rupee, Pakistani rupees, paisa, paise)
  87. PLN:(\D+) $(\1: zloty, zlotys, grosz, groszy)
  88. RON:(\D+) $(\1: Romanian leu, Romanian lei, ban, bani)
  89. RSD:(\D+) $(\1: Serbian dinar, Serbian dinars, para, para)
  90. RUB:(\D+) $(\1: Russian ruble, Russian rubles, kopek, kopeks)
  91. RWF:(\D+) $(\1: Rwandese franc, Rwandese francs, centime, centimes)
  92. SDG:(\D+) $(\1: Sudanese pound, Sudanese pounds, piastre, piastres)
  93. SGD:(\D+) $(\1: Singapore dollar, Singapore dollars, cent, cents)
  94. SLL:(\D+) $(\1: leone, leones, cent, cents)
  95. SZL:(\D+) $(\1: lilangeni, emalangeni, cent, cents)
  96. THB:(\D+) $(\1: baht, baht, satang, satang)
  97. TRY:(\D+) $(\1: Turkish lira, Turkish lira, kurus, kurus)
  98. TTD:(\D+) $(\1: Trinidad and Tobago dollar, Trinidad and Tobago dollars, cent, cents)
  99. TZS:(\D+) $(\1: Tanzanian shilling, Tanzanian shillings, cent, cents)
  100. UAH:(\D+) $(\1: hryvnia, hryvnia, kopiyka, kopiyka)
  101. UGX:(\D+) $(\1: Uganda shilling, Uganda shillings, cent, cents)
  102. USD:(\D+) $(\1: U.S. dollar, U.S. dollars, cent, cents)
  103. X[AO]F:(\D+) $(\1: CFA franc, CFA francs, centime, centimes)
  104. ZAR:(\D+) $(\1: South African rand, South African rand, cent, cents)
  105. ZMK:(\D+) $(\1: Zambian kwacha, Zambian kwacha, ngwee, ngwee)
  106. ZWL:(\D+) $(\1: Zimbabwe dollar, Zimbabwe dollars, cent, cents)
  107. "(JPY [-−]?\d+)[.,](\d\d)0" $1
  108. "(JPY [-−]?\d+[.,]\d\d)(\d)" $1 $2 rin
  109. "([A-Z]{3}) ([-−]?1)([.,]00?)?" $2 $(\1:us)
  110. "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2 $(\1:up)
  111. "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 jiao
  112. "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 fen
  113. "((MGA|MRO) [-−]?\d+)[.,]0" $1
  114. "((MGA|MRO) [-−]?\d+)[.,]2" $1 and |$(1) $(\2:ss)
  115. "((MGA|MRO) [-−]?\d+)[.,]4" $1 and |$(2) $(\2:sp)
  116. "((MGA|MRO) [-−]?\d+)[.,]6" $1 and |$(3) $(\2:sp)
  117. "((MGA|MRO) [-−]?\d+)[.,]8" $1 and |$(4) $(\2:sp)
  118. "(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 and |$(1) $(\2:ss)
  119. "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 and |$(\30) $(\2:sp)
  120. "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 and |$3 $(\2:sp)
  121. # ordinal numbers
  122. "ord ([-−]?\d+)" $(ord:|$1)
  123. ord:(.*)one \1first
  124. ord:(.*)two \1second
  125. ord:(.*)three \1third
  126. ord:(.*)five \1fifth
  127. ord:(.*)eight \1eighth
  128. ord:(.*)nine \1ninth
  129. ord:(.*)twelve \1twelfth
  130. ord:(.*)y \1ieth
  131. "ord:(.*[^ ]) *" \1th
  132. # ordinal abbreviation
  133. "ord2 (.*1\d)" \1th
  134. "ord2 (.*1)" \1st
  135. "ord2 (.*2)" \1nd
  136. "ord2 (.*3)" \1rd
  137. "ord2 (.*)" \1th
  138. help Functions:\n ord \(ordinal numbers, eg. "first"\)\nord2 \(ordinal abbreviations, eg. "1st"\)\nExtra modules:\nen_US_2 \(subunit as decimal fraction: "USD 20.25" -> twenty and 25/100 dollars\)