mr.sor 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. # mr.sor for - MARATHI मराठी Indian Language (mr-IN)
  2. # In many Indian languages including MARATHI, rules of number reading (from 0 up to number 100) are complex and inconsistent.
  3. # e.g often a number is read first with units place & then ten's place. - e.g 34 read as " चौतीस " where " चौ " stands for 4 (units place) and then तीस for 30 (ten's place) which is inverse with the number reading logic in ENGLISH (where it is read as Thirty Four)
  4. # Pronunciations of numbers changes and follows virtually no logic - e.g. 54 read as " चौपन्न " where ten's place 50 is read as पन्न but only No. 50 would be read as पन्नास !
  5. # when units place number is 9, the number is read with the reference to the NEXT number e.g. 39 is read as एकोणचाळीस where " एकोण " stands for 9 (units place) and then चाळीस with reference to 40 (the NEXT number) which is inverse with the number reading logic in ENGLISH (where it is read as Thirty Nine - reference of previous ten's place)
  6. # Reading of same units place but different ten's place is vastly different - e.g. 27 सत्तावीस , 47 सत्तेचाळीस , 67 सदुसष्ट , 77 सत्त्याहत्तर . Here same units place 7 has been read differently as सत्ता , सत्ते , सदु , सत्त्या ... very difficult to frame any logic !
  7. # Therefore we have hard coded numbers from 0 to 100 with Marathi translations.
  8. # Number reading after Hundred's place is very similar to English logic ... hence no problem in coding for further Marathi numbers
  9. # --------------------------------------
  10. # Number List in English , word in MARATHI
  11. # - Ankur Joshi , pharmankur@gmail.com
  12. #
  13. ^0 शून्य
  14. 1 एक
  15. 2 दोन
  16. 3 तीन
  17. 4 चार
  18. 5 पाच
  19. 6 सहा
  20. 7 सात
  21. 8 आठ
  22. 9 नऊ
  23. 10 दहा
  24. 11 अकरा
  25. 12 बारा
  26. 13 तेरा
  27. 14 चौदा
  28. 15 पंधरा
  29. 16 सोळा
  30. 17 सतरा
  31. 18 अठरा
  32. 19 एकोणीस
  33. 20 वीस
  34. 21 एकवीस
  35. 22 बावीस
  36. 23 तेवीस
  37. 24 चोवीस
  38. 25 पंचवीस
  39. 26 सव्वीस
  40. 27 सत्तावीस
  41. 28 अठ्ठावीस
  42. 29 एकोणतीस
  43. 30 तीस
  44. 31 एकतीस
  45. 32 बत्तीस
  46. 33 तेहतीस
  47. 34 चौतीस
  48. 35 पस्तीस
  49. 36 छत्तीस
  50. 37 सदतीस
  51. 38 अडतीस
  52. 39 एकोणचाळीस
  53. 40 चाळीस
  54. 41 एक्केचाळीस
  55. 42 बेचाळीस
  56. 43 त्रेचाळीस
  57. 44 चव्वेचाळीस
  58. 45 पंचेचाळीस
  59. 46 सेहेचाळीस
  60. 47 सत्तेचाळीस
  61. 48 अठ्ठेचाळीस
  62. 49 एकोणपन्नास
  63. 50 पन्नास
  64. 51 एकावन्न
  65. 52 बावन्न
  66. 53 त्रेपन्न
  67. 54 चौपन्न
  68. 55 पंचावन्न
  69. 56 छप्पन्न
  70. 57 सत्तावन्न
  71. 58 अठ्ठावन्न
  72. 59 एकोणसाठ
  73. 60 साठ
  74. 61 एकसष्ट
  75. 62 बासष्ट
  76. 63 त्रेसष्ट
  77. 64 चौसष्ट
  78. 65 पासष्ट
  79. 66 सहासष्ट
  80. 67 सदुसष्ट
  81. 68 अडुसष्ट
  82. 69 एकोणसत्तर
  83. 70 सत्तर
  84. 71 एकाहत्तर
  85. 72 बाहत्तर
  86. 73 त्र्याहत्तर
  87. 74 चौऱ्याहत्तर
  88. 75 पंचाहत्तर
  89. 76 शाहत्तर
  90. 77 सत्त्याहत्तर
  91. 78 अठ्ठ्याहत्तर
  92. 79 एकोणऐंशी
  93. 80 ऐंशी
  94. 81 एक्याऐंशी
  95. 82 ब्याऐंशी
  96. 83 त्र्याऐंशी
  97. 84 चौऱ्याऐंशी
  98. 85 पंचाऐंशी
  99. 86 शहाऐंशी
  100. 87 सत्त्याऐंशी
  101. 88 अठ्ठ्याऐंशी
  102. 89 एकोणनव्वद
  103. 90 नव्वद
  104. 91 एक्याण्णव
  105. 92 ब्याण्णव
  106. 93 त्र्याण्णव
  107. 94 चौऱ्याण्णव
  108. 95 पंचाण्णव
  109. 96 शहाण्णव
  110. 97 सत्त्याण्णव
  111. 98 अठ्ठ्याण्णव
  112. 99 नव्याण्णव
  113. 100 शंभर
  114. # ------------------------
  115. # separator function
  116. :0+ # एक हजार
  117. :0*\d?\d " आणि " # एक हजार आणि पाच
  118. :\d+ ", " # एक कोटी, एक लाख, एक हजार दोनशेएक्केचाळीस
  119. # ------------------------
  120. (\d)(\d\d) $1शे[ $2] # default: एकशे एक Note - The intentional space before $ in [ $2] . This is done to eliminate Zero error after 100
  121. (\d{1,2})(\d\d\d) $1 हजार[ $2] # दहा हजार दोनशे
  122. (\d{1,2})(\d{5}) $1 लाख$(:\2)$2 # 5 zero after number thus its a LAKH [ 5th power of 10 is LAKH thus expression (\d{5}) , after this next is CRORE which is 7th power i.e. diff of 2 powers thus expression (\d{1,2}) . Foww this henceforth if in future needs to adjust Name of decimal places ]
  123. (\d{1,2})(\d{7}) $1 कोटी$(:\2)$2 # 7 zero after number thus its a CRORE
  124. (\d{1,1})(\d{9}) $1 अब्ज$(:\2)$2 # 9 zero after number thus its a ABJA (equivalant to a BILLION)
  125. (\d{1,1})(\d{10}) $1 खर्व$(:\2)$2 # 10 zero after number thus its a KHARVA
  126. (\d{1,1})(\d{11}) $1 निखर्व$(:\2)$2 # 11 zero after number thus its a NIKHARVA
  127. (\d{1,1})(\d{12}) $1 महापद्म$(:\2)$2 # 12 zero after number thus its a MAHAPADMA (equivalant to a TRILLION)
  128. (\d{1,1})(\d{13}) $1 शंकू$(:\2)$2 # 1३ zero after number thus its a SHANKU
  129. (\d{1,1})(\d{14}) $1 जलधि$(:\2)$2 # 14 zero after number thus its a JALADHI
  130. (\d{1,1})(\d{15}) $1 अन्त्य$(:\2)$2 # 15 zero after number thus its a ANTYA (equivalant to a QUADRILLION)
  131. (\d{1,1})(\d{16}) $1 मध्य$(:\2)$2 # 16 zero after number thus its a MADHYA
  132. (\d{1,50})(\d{17}) $1 परार्ध$(:\2)$2 # 17 zero after number thus its a PARARDH. Practically unlimited numbers are sumed um in Parardh.
  133. ### Above nameing for decimal places is with reference to work by BHASKARACHARYA (1150 AD) from book LILAVATI , SHLOKA (Verse) no 11 & 12 which is -->
  134. ### एक दशशत सहस्त्र अयुत लक्ष प्रयुत कोट्य: क्रमश: |
  135. ### अर्बुदम् अब्जम् खर्व निखर्व महापद्म शंकव: तस्मात्: || 11 ||
  136. ### जलधिंच अन्त्यम् मध्यम् परार्धम् इति दशगुणोत्तरम् संज्ञा: |
  137. ### संख्याया: स्थानानां व्यवहारार्थम् कृता: पूर्वै: || 12 ||
  138. ###
  139. ### Verse is translated as -->
  140. ### Positions of the digits from right to left are unit, ten, hundred, thousand, ten thousand, hundred thousand (lakh), million, ten million (Crore), hundred million, billion (abja), Kharva, Nikharva, Mahapadma, Sanku, Jaladhi, Antya, Madhya, Parardha. The value of each digit on the left is ten times that on the right.
  141. ### Although for practical purpose this verse goes up to parardha (17th power of 10), there are terms for numbers up to 140th power of 10 in Sanskrit.
  142. ### In todays practice wordings अयुत and प्रयुत are not used and if used are replaced by दशसहस्त्र and दशलक्ष / दशलाख respectively (Not used here)
  143. ###
  144. # ------------------------
  145. # negative number
  146. [-−](\d+) उणे |$1
  147. # ------------------------
  148. # decimals
  149. 0[.,] शून्य दशांश
  150. ([-−]?\d+)[.,] $1| दशांश
  151. "([-−]?\d+[.,])([^0]\d)" $1| |$2 # e.g. एकशे वीस दशांश नऊ
  152. "([-−]?\d+[.,])(0)(0)(\d)" $1| |$2 |$3 |$4 # e.g. सदुसष्ठ दशांश शून्य शून्य नऊ
  153. "([-−]?\d+[.,])(0)(\d\d)" $1| |$2 |$3 # e.g. एकोणनव्वद दशांश शून्य एकोणनव्वद
  154. "([-−]?\d+[.,])(\d\d\d)" $1| |$2 # e.g. तेवीस दशांश पाचशे सदुसष्ठ , upto 3 places after decimal, decimals read in hundreds
  155. "([-−]?\d+[.,])(\d)(\d)(\d)(\d)" $1| |$2 |$3 |$4 |$5 # e.g. चव्वेचाळीस दशांश पाच सात दोन पाच
  156. "([-−]?\d+[.,]\d*)(\d)" $1| |$2
  157. # ------------------------
  158. # currency
  159. # unit/subunit singular/plural
  160. us:([^,]*),([^,]*),([^,]*),([^,]*) \1
  161. up:([^,]*),([^,]*),([^,]*),([^,]*) \2
  162. ss:([^,]*),([^,]*),([^,]*),([^,]*) \3
  163. sp:([^,]*),([^,]*),([^,]*),([^,]*) \4
  164. AED:(\D+) $(\1: अमीराती दिऱ्हाम, अमीराती दिऱ्हाम, फिल्स्, फिल्स्)
  165. AUD:(\D+) $(\1: ऑस्ट्रेलिअन डॉलर, ऑस्ट्रेलिअन डॉलर्स, सेंट, सेंटस्)
  166. BGN:(\D+) $(\1: lev, leva, stotinka, stotinki)
  167. BWP:(\D+) $(\1: pula, pula, thebe, thebe)
  168. CAD:(\D+) $(\1: कॅनेडीअन डॉलर, कॅनेडीअन डॉलर्स, सेंट, सेंटस्)
  169. CHF:(\D+) $(\1: स्विस् फ्रॅंक, स्विस् फ्रॅंकस्, सेंटीम, सेंटीमस्)
  170. CNY:(\D+) $(\1: चायनीज युआन, चायनीज युआन, फेन, फेन)
  171. CZK:(\D+) $(\1: Czech koruna, Czech koruny, halér, halére)
  172. EEK:(\D+) $(\1: kroon, kroonid, sent, senti)
  173. EUR:(\D+) $(\1: युरो, युरो, सेंट, सेंटस्)
  174. GBP:(\D+) $(\1: पौंड स्टर्लिंग, पौंडस् स्टर्लिंग, पेनी, पेन्स्)
  175. GHS:(\D+) $(\1: Ghana cedi, Ghana cedis, pesewa, pesewas)
  176. GMD:(\D+) $(\1: dalasi, dalasi, butut, bututs)
  177. HKD:(\D+) $(\1: हॉन्गकॉन्ग डॉलर, हॉन्गकॉन्ग डॉलर्स, सेंट, सेंटस्)
  178. HRK:(\D+) $(\1: kuna, kuna, lipa, lipa)
  179. HUF:(\D+) $(\1: forint, forint, fillér, fillér)
  180. # --- Using Indian Rupee Symbol " ₹ " ------
  181. INR:(\D+) $(\1: ₹ रुपया, ₹ रुपये, पैसा, पैसे)
  182. # ------------------------------------------
  183. JMD:(\D+) $(\1: Jamaica dollar, Jamaica dollars, cent, cents)
  184. JPY:(\D+) $(\1: जपानी येन, जपानी येन, सेन, सेन)
  185. KES:(\D+) $(\1: Kenyan shilling, Kenyan shillings, cent, cents)
  186. KRW:(\D+) $(\1: Korean won, Korean won, jeon, jeon)
  187. KWD:(\D+) $(\1: कुवेती दिनार, कुवेती दिनार, फिल्स्, फिल्स्)
  188. LRD:(\D+) $(\1: Liberian dollar, Liberian dollars, cent, cents)
  189. LSL:(\D+) $(\1: loti, maloti, sente, lisente)
  190. LTL:(\D+) $(\1: litas, litai, centas, centai)
  191. LVL:(\D+) $(\1: lats, lati, santims, santimi)
  192. MGA:(\D+) $(\1: ariary, ariaries, iraimbilanja, iraimbilanja)
  193. MUR:(\D+) $(\1: Mauritian rupee, Mauritian rupees, cent, cents)
  194. MXN:(\D+) $(\1: Mexican peso, Mexican pesos, centavo, centavos)
  195. MWK:(\D+) $(\1: Malawian kwacha, Malawian kwacha, tambala, tambala)
  196. MYR:(\D+) $(\1: Ringgit, Ringgit, cent, cents)
  197. NAD:(\D+) $(\1: Namibian dollar, Namibian dollars, cent, cents)
  198. NGN:(\D+) $(\1: naira, naira, kobo, kobo)
  199. NZD:(\D+) $(\1: न्यूझीलंड डॉलर, न्यूझीलंड डॉलर्स, सेंट, सेंटस्)
  200. PGK:(\D+) $(\1: kina, kina, toea, toea)
  201. PHP:(\D+) $(\1: Philippine peso, Philippine pesos, centavo, centavos)
  202. PKR:(\D+) $(\1: पाकिस्तानी रुपया, पाकिस्तानी रुपये, पैसा, पैसे)
  203. PLN:(\D+) $(\1: zloty, zlotys, grosz, groszy)
  204. RON:(\D+) $(\1: Romanian leu, Romanian lei, ban, bani)
  205. RSD:(\D+) $(\1: Serbian dinar, Serbian dinars, para, para)
  206. RUB:(\D+) $(\1: Russian ruble, Russian rubles, kopek, kopeks)
  207. RWF:(\D+) $(\1: Rwandese franc, Rwandese francs, centime, centimes)
  208. SAR:(\D+) $(\1: सौदी रियाल, सौदी रियाल, हलाला, हलाला)
  209. SDG:(\D+) $(\1: Sudanese pound, Sudanese pounds, piastre, piastres)
  210. SGD:(\D+) $(\1: सिंगापुर डॉलर, सिंगापुर डॉलर्स, सेंट, सेंटस्)
  211. SLL:(\D+) $(\1: leone, leones, cent, cents)
  212. SZL:(\D+) $(\1: lilangeni, emalangeni, cent, cents)
  213. THB:(\D+) $(\1: baht, baht, satang, satang)
  214. TRY:(\D+) $(\1: Turkish lira, Turkish lira, kurus, kurus)
  215. TTD:(\D+) $(\1: Trinidad and Tobago dollar, Trinidad and Tobago dollars, cent, cents)
  216. TZS:(\D+) $(\1: Tanzanian shilling, Tanzanian shillings, cent, cents)
  217. UAH:(\D+) $(\1: hryvnia, hryvnia, kopiyka, kopiyka)
  218. UGX:(\D+) $(\1: Uganda shilling, Uganda shillings, cent, cents)
  219. USD:(\D+) $(\1: यु. एस. डॉलर, यु. एस. डॉलर्स, सेंट, सेंटस् )
  220. X[AO]F:(\D+) $(\1: CFA franc, CFA francs, centime, centimes)
  221. ZAR:(\D+) $(\1: South African rand, South African rand, cent, cents)
  222. ZMK:(\D+) $(\1: Zambian kwacha, Zambian kwacha, ngwee, ngwee)
  223. ZWL:(\D+) $(\1: Zimbabwe dollar, Zimbabwe dollars, cent, cents)
  224. "(JPY [-−]?\d+)[.,](\d\d)0" $1
  225. "(JPY [-−]?\d+[.,]\d\d)(\d)" $1 $2 रिन
  226. "([A-Z]{3}) ([-−]?1)([.,]00?)?" $2$(\1:us)
  227. "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2$(\1:up)
  228. "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 ज्याओ
  229. "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 फेन
  230. "((MGA|MRO) [-−]?\d+)[.,]0" $1
  231. "((MGA|MRO) [-−]?\d+)[.,]2" $1 आणि |$(1)$(\2:ss)
  232. "((MGA|MRO) [-−]?\d+)[.,]4" $1 आणि |$(2)$(\2:sp)
  233. "((MGA|MRO) [-−]?\d+)[.,]6" $1 आणि |$(3)$(\2:sp)
  234. "((MGA|MRO) [-−]?\d+)[.,]8" $1 आणि |$(4)$(\2:sp)
  235. "(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 आणि |$(1)$(\2:ss)
  236. "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 आणि |$(\30)$(\2:sp)
  237. "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 आणि |$3$(\2:sp)
  238. == money ==
  239. "(JPY [-−]?\d+)[.,](\d\d)0" $1
  240. "(JPY [-−]?\d+[.,]\d\d)(\d)" $1 $2 रिन
  241. "([A-Z]{3}) ([-−]?1)([.,]00?)?" $2$(\1:us)
  242. "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2$(\1:up)
  243. "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 ज्याओ
  244. "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 फेन
  245. "(MGA|MRO) ([-−]?\d+)[.,]0" $2$(\1:us)
  246. "(MGA|MRO) ([-−]?\d+)[.,]2" $2 आणि 1/5$(\1:us)
  247. "(MGA|MRO) ([-−]?\d+)[.,]4" $2 आणि 2/5$(\1:up)
  248. "(MGA|MRO) ([-−]?\d+)[.,]6" $2 आणि 3/5$(\1:up)
  249. "(MGA|MRO) ([-−]?\d+)[.,]8" $2 आणि 4/5$(\1:up)
  250. "([A-Z]{3}) ([-−]?1)" $2$(\1:us)
  251. "([A-Z]{3}) ([-−]?\d+)" $2$(\1:up)
  252. "(([A-Z]{3}) ([-−]?\d+))[.,](01)" $3 आणि 1/100$(\2:us)
  253. "(([A-Z]{3}) ([-−]?\d+))[.,](\d)" $3 आणि \40/100$(\2:up)
  254. "(([A-Z]{3}) ([-−]?\d+))[.,](\d\d)" $3 आणि \4/100$(\2:up)
  255. "(([A-Z]{3}) ([-−]?\d+))[.,](\d\d\d)" $3 आणि \4/1000$(\2:up)
  256. # ------------------------
  257. # Ordinal ------
  258. # Ordinal no. reading in Marathi are GENDER dependent ( and not as simple in English where anyone at no 1 will be read as FIRST )
  259. # in Marathi there are 3 gender identities Male पुल्लिंगी , Female स्त्रिलिंगी & Neutral नपुसकलिंगी (similar to masculine, feminine, neuter in Swiss )
  260. # -----------------------
  261. # If a sentence refer to MALE subject equivalent of FIRST is पहिला
  262. # ordinal masculine --- पुल्लिंगी
  263. == ordinal-masculine ==
  264. ([-−]?\d+) $(ordinal-masculine |$1)
  265. (.*)एक \1पहिला
  266. (.*)दोन \1दुसरा
  267. (.*)तीन \1तिसरा
  268. (.*)चार \1चौथा
  269. (.*)पाच \1पाचवा
  270. (.*)सहा \1सहावा
  271. (.*)सात \1सातवा
  272. (.*)आठ \1आठवा
  273. (.*)नऊ \1नववा
  274. (.*)दहा \1दहावा
  275. (.*)अकरा \1अकरावा
  276. (.*)बारा \1बारावा
  277. (.*)तेरा \1तेरावा
  278. (.*)चौदा \1चौदावा
  279. (.*)पंधरा \1पंधरावा
  280. (.*)सोळा \1सोळावा
  281. (.*)सतरा \1सतरावा
  282. (.*)अठरा \1अठरावा
  283. (.*)एकोणऐंशी \1एकोणऐंशीवा
  284. (.*)ऐंशी \1ऐंशीवा
  285. (.*)एक्याऐंशी \1एक्याऐंशीवा
  286. (.*)ब्याऐंशी \1ब्याऐंशीवा
  287. (.*)त्र्याऐंशी \1त्र्याऐंशीवा
  288. (.*)चौऱ्याऐंशी \1चौऱ्याऐंशीवा
  289. (.*)पंचाऐंशी \1पंचाऐंशीवा
  290. (.*)शहाऐंशी \1शहाऐंशीवा
  291. (.*)सत्त्याऐंशी \1सत्त्याऐंशीवा
  292. (.*)अठ्ठ्याऐंशी \1अठ्ठ्याऐंशीवा
  293. ([-−]?\d+)[.,](.*) $1 दशांश $(\2)वा # Ordinal of Decimals
  294. (.*) \1ावा # General Masculine Ordinal
  295. # -----------------------
  296. # If a sentence refer to FEMALE subject equivalent of FIRST is पहिली
  297. # ordinal feminine --- स्त्रिलिंगी
  298. == ordinal-feminine ==
  299. ([-−]?\d+) $(ordinal-feminine |$1)
  300. (.*)एक \1पहिली
  301. (.*)दोन \1दुसरी
  302. (.*)तीन \1तिसरी
  303. (.*)चार \1चौथी
  304. (.*)पाच \1पाचवी
  305. (.*)सहा \1सहावी
  306. (.*)सात \1सातवी
  307. (.*)आठ \1आठवी
  308. (.*)नऊ \1नववी
  309. (.*)दहा \1दहावी
  310. (.*)अकरा \1अकरावी
  311. (.*)बारा \1बारावी
  312. (.*)तेरा \1तेरावी
  313. (.*)चौदा \1चौदावी
  314. (.*)पंधरा \1पंधरावी
  315. (.*)सोळा \1सोळावी
  316. (.*)सतरा \1सतरावी
  317. (.*)अठरा \1अठरावी
  318. (.*)एकोणऐंशी \1एकोणऐंशीवी
  319. (.*)ऐंशी \1ऐंशीवी
  320. (.*)एक्याऐंशी \1एक्याऐंशीवी
  321. (.*)ब्याऐंशी \1ब्याऐंशीवी
  322. (.*)त्र्याऐंशी \1त्र्याऐंशीवी
  323. (.*)चौऱ्याऐंशी \1चौऱ्याऐंशीवी
  324. (.*)पंचाऐंशी \1पंचाऐंशीवी
  325. (.*)शहाऐंशी \1शहाऐंशीवी
  326. (.*)सत्त्याऐंशी \1सत्त्याऐंशीवी
  327. (.*)अठ्ठ्याऐंशी \1अठ्ठ्याऐंशीवी
  328. ([-−]?\d+)[.,](.*) $1 दशांश $(\2)वी # Ordinal of Decimals
  329. (.*) \1ावी # General Feminine Ordinal
  330. # -----------------------
  331. # If a sentence refer to NEUTRAL subject equivalent of FIRST is पहिले / पहिलं
  332. # ordinal neutral --- नपुसकलिंगी
  333. == ordinal-neutral ==
  334. ([-−]?\d+) $(ordinal-neutral |$1)
  335. (.*)एक \1पहिले
  336. (.*)दोन \1दुसरे
  337. (.*)तीन \1तिसरे
  338. (.*)चार \1चौथे
  339. (.*)पाच \1पाचवे
  340. (.*)सहा \1सहावे
  341. (.*)सात \1सातवे
  342. (.*)आठ \1आठवे
  343. (.*)नऊ \1नववे
  344. (.*)दहा \1दहावे
  345. (.*)अकरा \1अकरावे
  346. (.*)बारा \1बारावे
  347. (.*)तेरा \1तेरावे
  348. (.*)चौदा \1चौदावे
  349. (.*)पंधरा \1पंधरावे
  350. (.*)सोळा \1सोळावे
  351. (.*)सतरा \1सतरावे
  352. (.*)अठरा \1अठरावे
  353. (.*)एकोणऐंशी \1एकोणऐंशीवे
  354. (.*)ऐंशी \1ऐंशीवे
  355. (.*)एक्याऐंशी \1एक्याऐंशीवे
  356. (.*)ब्याऐंशी \1ब्याऐंशीवे
  357. (.*)त्र्याऐंशी \1त्र्याऐंशीवे
  358. (.*)चौऱ्याऐंशी \1चौऱ्याऐंशीवे
  359. (.*)पंचाऐंशी \1पंचाऐंशीवे
  360. (.*)शहाऐंशी \1शहाऐंशीवे
  361. (.*)सत्त्याऐंशी \1सत्त्याऐंशीवे
  362. (.*)अठ्ठ्याऐंशी \1अठ्ठ्याऐंशीवे
  363. ([-−]?\d+)[.,](.*) $1 दशांश $(\2)वे # Ordinal of Decimals
  364. (.*) \1ावे # General Neutral Ordinal
  365. # -----------------------
  366. # As the SUBJECT in the sentence forming is unknown and is out of scope of this code, default ordinal numbering is set to output all possible GENDERs separated by " / " , and hence may not deliver grammatically correct sentences ( we have hard coded Ordinal numbers from 1-10 with all possible GENDERs separated by " / " .. as in पहिला / पहिली / पहिले
  367. # This is done deliberately considering ease of use.
  368. # As separate commands for masculine, feminine & neutral eventhough exists, a User may not be aware. So by providing all gender words in default ordinal option, user at least will get some output of relevance.
  369. # ordinal default --- ordinal words with all gender options separated by " / "
  370. == ordinal == # Default
  371. ([-−]?\d+) $(ordinal |$1)
  372. (.*)एक \1पहिला / \1 पहिली / \1 पहिले
  373. (.*)दोन \1दुसरा / \1 दुसरी / \1 दुसरे
  374. (.*)तीन \1तिसरा / \1 तिसरी / \1 तिसरे
  375. (.*)चार \1चौथा / \1 चौथी / \1 चौथे
  376. (.*)पाच \1पाचवा / \1 पाचवी / \1 पाचवे
  377. (.*)सहा \1सहावा / \1 सहावी / \1 सहावे
  378. (.*)सात \1सातवा / \1 सातवी / \1 सातवे
  379. (.*)आठ \1आठवा / \1 आठवी / \1 आठवे
  380. (.*)नऊ \1नववा / \1 नववी / \1 नववे
  381. (.*)दहा \1दहावा / \1 दहावी / \1 दहावे
  382. (.*)अकरा \1अकरावा / \1 अकरावी / \1 अकरावे
  383. (.*)बारा \1बारावा / \1 बारावी / \1 बारावे
  384. (.*)तेरा \1तेरावा / \1 तेरावी / \1 तेरावे
  385. (.*)चौदा \1चौदावा / \1 चौदावी / \1 चौदावे
  386. (.*)पंधरा \1पंधरावा / \1 पंधरावी / \1 पंधरावे
  387. (.*)सोळा \1सोळावा / \1 सोळावी / \1 सोळावे
  388. (.*)सतरा \1सतरावा / \1 सतरावी / \1 सतरावे
  389. (.*)अठरा \1अठरावा / \1 अठरावी / \1 अठरावे
  390. (.*)एकोणऐंशी \1एकोणऐंशीवा / \1 एकोणऐंशीवी / \1 एकोणऐंशीवे
  391. (.*)ऐंशी \1ऐंशीवा / \1 ऐंशीवी / \1 ऐंशीवे
  392. (.*)एक्याऐंशी \1एक्याऐंशीवा / \1 एक्याऐंशीवी / \1 एक्याऐंशीवे
  393. (.*)ब्याऐंशी \1ब्याऐंशीवा / \1 ब्याऐंशीवी / \1 ब्याऐंशीवे
  394. (.*)त्र्याऐंशी \1त्र्याऐंशीवा / \1 त्र्याऐंशीवी / \1 त्र्याऐंशीवे
  395. (.*)चौऱ्याऐंशी \1चौऱ्याऐंशीवा / \1 चौऱ्याऐंशीवी / \1 चौऱ्याऐंशीवे
  396. (.*)पंचाऐंशी \1पंचाऐंशीवा / \1 पंचाऐंशीवी / \1 पंचाऐंशीवे
  397. (.*)शहाऐंशी \1शहाऐंशीवा / \1 शहाऐंशीवी / \1 शहाऐंशीवे
  398. (.*)सत्त्याऐंशी \1सत्त्याऐंशीवा / \1 सत्त्याऐंशीवी / \1 सत्त्याऐंशीवे
  399. (.*)अठ्ठ्याऐंशी \1अठ्ठ्याऐंशीवा / \1 अठ्ठ्याऐंशीवी / \1 अठ्ठ्याऐंशीवे
  400. ([-−]?\d+)[.,](.*) $1 दशांश $(\2)वा / $1 दशांश $(\2)वी / $1 दशांश $(\2)वे # Ordinal of Decimals
  401. (.*) \1ावा / \1ावी / \1ावे # General ALL Gender Ordinals
  402. # -----------------------
  403. # Also we have considered to use generalized method where result for "ELEVEN" will be like - क्रमांक अकरा (similar to saying "Rank Eleven" in English in a gender neutral way.)
  404. # ordinal Sequential --- ordinal-sq
  405. == ordinal-sq ==
  406. ([-−]?\d+) $(ordinal-sq |$1)
  407. (.*) क्रमांक \1
  408. # ------------------------
  409. # ordinal-number
  410. # Not relevant in Marathi
  411. == ordinal-number ==
  412. ([-−]?\d+) $(ordinal-number |$2)
  413. (.*) \2
  414. # ------------------------
  415. # cardinal
  416. # Not relevant in Marathi
  417. == cardinal(-)? ==
  418. ([-−]?\d+) $(cardinal |$2)
  419. (.*) \2
  420. # ------------------------
  421. == year ==
  422. (1[0-9])00 $1शे
  423. (1[0-9])([0-9][0-9]) $1शे $2 # e.g. 1857 = अठराशे सत्तावन्न , 1947 = एकोणीसशे सत्तेचाळीस
  424. (2[0-9])([0-9][0-9]) $1शे $2 # e.g. 2021 = वीसशे एकवीस
  425. (3[0-9])([0-9][0-9]) $1शे $2
  426. (4[0-9])([0-9][0-9]) $1शे $2
  427. (5[0-9])([0-9][0-9]) $1शे $2
  428. (6[0-9])([0-9][0-9]) $1शे $2
  429. (7[0-9])([0-9][0-9]) $1शे $2
  430. (8[0-9])([0-9][0-9]) $1शे $2
  431. (9[0-9])([0-9][0-9]) $1शे $2
  432. (.*) $(year-remove-and $1)
  433. # ------------------------
  434. == year-remove-and ==
  435. "(.*) and (.*)" \1 \2
  436. (.*) \1
  437. == help ==
  438. "" $(1)|, $(2), $(3)\n$(\0 ordinal)$(\0 ordinal-masculine)$(\0 ordinal-feminine)$(\0 ordinal-neutral)$(\0 ordinal-sq)$(\0 ordinal-number)year: $(year 1999), two thousand, $(year 2001)
  439. "" \ncurrency \(for example, INR\): $(INR 2.5)\nmoney INR: $(money INR 2.5) \1: $(\1 1), $(\1 2), $(\1 3)\n