ro.sor 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ^0 zero
  2. 1 unu
  3. 2$ doi
  4. 2 două
  5. 3 trei
  6. 4 patru
  7. 5 cinci
  8. 6$ șase
  9. 6 șai
  10. 7 șapte
  11. 8 opt
  12. 9 nouă
  13. 10 zece
  14. 11 unsprezece
  15. 12 doisprezece
  16. 14 paisprezece
  17. 1(\d) $1sprezece
  18. (\d)(\d) $1zeci[ și $2]
  19. 1(\d\d) o sută[ $1]
  20. (\d)(\d\d) $1 sute[ $2]
  21. 1(\d{3}) o mie[ $1]
  22. (1?\d)(\d{3}) $1 mii[ $2]
  23. (\d{1,3})(\d{3}) $1 de mii[ $2]
  24. 1(\d{6}) un milion[ $1]
  25. (1?\d)(\d{6}) $1 milioane[ $2]
  26. (\d{1,3})(\d{6}) $1 de milioane[ $2]
  27. 1(\d{9}) un miliard[ $1]
  28. (1?\d)(\d{9}) $1 miliarde[ $2]
  29. (\d{1,3})(\d{9}) $1 de miliarde[ $2]
  30. 1(\d{12}) un trilion[ $1]
  31. (1?\d)(\d{12}) $1 trilioane[ $2]
  32. (\d{1,3})(\d{12}) $1 de trilioane[ $2]
  33. 1(\d{15}) un cvadrilion[ $1]
  34. (1?\d)(\d{15}) $1 cvadrilioane[ $2]
  35. (\d{1,3})(\d{15}) $1 de cvadrilioane[ $2]
  36. 1(\d{18}) un cvintilion[ $1]
  37. (1?\d)(\d{18}) $1 cvintilioane[ $2]
  38. (\d{1,3})(\d{18}) $1 de cvintilioane[ $2]
  39. 1(\d{21}) un sextilion[ $1]
  40. (1?\d)(\d{21}) $1 sextilioane[ $2]
  41. (\d{1,3})(\d{21}) $1 de sextilioane[ $2]
  42. 1(\d{24}) un septilion[ $1]
  43. (1?\d)(\d{24}) $1 septilioane[ $2]
  44. (\d{1,3})(\d{24}) $1 de septilioane[ $2]
  45. # negative number
  46. [-−](\d+) minus |$1
  47. # decimals
  48. "([-−]?\d+)[.,]" $1| virgulă
  49. "([-−]?\d+[.,])([^0]\d)" $1| |$2
  50. "([-−]?\d+[.,])(\d)(\d)(\d)" $1| |$2 |$3 |$4
  51. "([-−]?\d+[.,]\d*)(\d)" $1| |$2
  52. # currency
  53. # feminine/masculine correction for 1 and 2
  54. f:(.*)unu \1 o
  55. f:(.*do)i "\1uă "
  56. m:(.*un)u \1
  57. .:(.*) \1
  58. # unit/subunit, singular/plural, feminine/masculine unit, feminine/masculine subunit
  59. us(.).:([^,]*),([^,]*),([^,]*),([^,]*),([^,]*) $(\1:\6) \2
  60. up(.).:([^,]*),([^,]*),([^,]*),([^,]*),([^,]*) $(\1:\6) \3
  61. ss.(.):([^,]*),([^,]*),([^,]*),([^,]*),([^,]*) $(\1:\6) \4
  62. sp.(.):([^,]*),([^,]*),([^,]*),([^,]*),([^,]*) $(\1:\6) \5
  63. # "mm" means masculine unit and masculine subunit
  64. CHF:(.+),(.+) $(\1mm: franc elvețian, franci elvețieni, cent, cenți, \2)
  65. CNY:(.+),(.+) $(\1mm: yuan renminbi, yuani renminbi, fen, fen, \2)
  66. EUR:(.+),(.+) $(\1mm: euro, euro, cent, cenți, \2)
  67. GBP:(.+),(.+) $(\1fm: liră sterlină, lire sterline, penny, pence, \2)
  68. JPY:(.+),(.+) $(\1mm: yen, yeni, sen, sen, \2)
  69. RON:(.+),(.+) $(\1mm: leu românesc, lei românești, ban, bani, \2)
  70. USD:(.+),(.+) $(\1mm: dolar american, dolari americani, cent, cenți, \2)
  71. "([A-Z]{3}) ([-−]?1)([.,]00?)?" $(-remove-extra-space $(\1:us,|$2))
  72. "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $(-remove-extra-space $(\1:up,|$2))
  73. "(CNY [-−]?\d+)[.,]10?" $1| un jiao
  74. "(CNY [-−]?\d+)[.,](\d)0?" $1| $2| jiao
  75. "(CNY [-−]?\d+[.,]\d)1" $1| $2| fen
  76. "(CNY [-−]?\d+[.,]\d)(\d)" $1| $2| fen
  77. "(([A-Z]{3}) [-−]?\d+)[.,](01)" $(-remove-extra-space $1|$(\2:ss,$(1)))
  78. "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $(-remove-extra-space $1|$(\2:sp,$(\30)))
  79. "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $(-remove-extra-space $1|$(\2:sp,$3))
  80. == -remove-extra-space ==
  81. "^ (.*)" $(-remove-extra-space \1)
  82. "(.*) ( .*)" \1\2
  83. (.*) \1
  84. == ordinal(-masculine)? ==
  85. 1 primul
  86. ([-−]?\d+) al $(ordinal $2)
  87. (.*(opt|ilion|ard)) \2ulea
  88. (.*) \2lea
  89. == ordinal-feminine ==
  90. 1 prima
  91. ([-−]?\d+) a $(ordinal-feminine $1)
  92. (.*)doi \1doua
  93. (.*)cinci \1cincea
  94. (.*)[uă] \1a
  95. (.*)sute \1suta
  96. (.*)mi[ei] \1mia
  97. (.*)ane \1ana
  98. (.*) \1a
  99. == ordinal-number ==
  100. (\d+) \1.
  101. == help ==
  102. "" $(1), |$(2)|, $(3)\n$(help ordinal-feminine)$(help ordinal-masculine)$(help ordinal-number)
  103. (ordinal(-feminine|-masculine|-number)?) \1: $(\1 1), $(\1 2), $(\1 3)\n