sr.sor 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #
  2. # Regular number to text transducer for Serbian (Cyrillic) written in Soros
  3. # Copyright (c) Goran Rakic <grakic@devbase.net> 2009.
  4. #
  5. # Released under Creative Commons 3.0 Attribution - Share Alike license
  6. # and relicensed under GNU Lesser General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # Visit http://numbertext.org for more info on Soros language and syntax
  11. #
  12. (\d{1,3})\.([\d.,]+) $(\1\2)
  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. 14 четрнаест
  26. 16 шеснаест
  27. 1(\d) $1наест
  28. 4(\d) четрдесет[ $1]
  29. 5(\d) педесет[ $1]
  30. 6(\d) шездесет[ $1]
  31. 9(\d) деведесет[ $1]
  32. (\d)(\d) $1десет[ $2]
  33. 1(\d\d) сто[ $1]
  34. 2(\d\d) двеста[ $1]
  35. 3(\d\d) триста[ $1]
  36. (\d)(\d\d) $1сто[ $2]
  37. 1(\d\d\d) хиљаду[ $1]
  38. 2(\d\d\d) две хиљаде[ $1]
  39. ([34])(\d\d\d) $1 хиљаде[ $2]
  40. (\d{0,1})1(\d)(\d\d\d) $(\11\2) хиљада[ $3]
  41. (\d{1,2})1(\d\d\d) $(\10) једна хиљада[ $2]
  42. (\d{1,2})2(\d\d\d) $(\10) две хиљаде[ $2]
  43. (\d{1,2})([34])(\d\d\d) $(\10) $2 хиљаде[ $3]
  44. (\d{1,3})(\d\d\d) $1 хиљада[ $2]
  45. 1(\d{6}) милион[ $1]
  46. (\d{0,4})1(\d)(\d{6}) $(\11\2) милиона[ $3]
  47. (\d{1,5})1(\d{6}) $(\10) један милион[ $2]
  48. (\d{1,3})(\d{6}) $1 милиона[ $2]
  49. 1(\d{9}) милијарда[ $1]
  50. 2(\d{9}) две милијарде[ $1]
  51. ([34])(\d{9}) $1 милијарде[ $2]
  52. (\d{1,2})0(\d{9}) $(\10) милијарди[ $2]
  53. (\d{0,1})1(\d)(\d{9}) $(\11\2) милијарди[ $3]
  54. (\d{1,2})1(\d{9}) $(\10) једна милијарда[ $2]
  55. (\d{1,2})2(\d{9}) $(\10) две милијарде[ $2]
  56. (\d{1,2})([34])(\d{9}) $(\10) $2 милијарде[ $3]
  57. (\d{1,3})(\d{9}) $1 милијарде[ $2]
  58. 1(\d{12}) билион[ $1]
  59. (\d{0,4})1(\d)(\d{12}) $(\11\2) билионa[ $3]
  60. (\d{1,5})1(\d{12}) $(\10) један билион[ $2]
  61. (\d{1,6})(\d{12}) $1 билиона[ $2]
  62. 1(\d{18}) трилион[ $1]
  63. (\d{0,4})1(\d)(\d{18}) $(\11\2) трилиона[ $3]
  64. (\d{1,5})1(\d{18}) $(\10) један трилион[ $2]
  65. (\d{1,6})(\d{18}) $1 трилиона[ $2]
  66. 1(\d{24}) квадрилион[ $1]
  67. (\d{0,4})1(\d)(\d{24}) $(\11\2) квадрилиона[ $3]
  68. (\d{1,5})1(\d{24}) $(\10) један квадрилион[ $2]
  69. (\d{1,6})(\d{24}) $1 квадрилиона[ $2]
  70. 1(\d{30}) квинтилион[ $1]
  71. (\d{0,4})1(\d)(\d{30}) $(\11\2) квинтилиона[ $3]
  72. (\d{1,5})1(\d{30}) $(\10) један квинтилион[ $2]
  73. (\d{1,6})(\d{30}) $1 квинтилиона[ $2]
  74. 1(\d{36}) секстилион[ $1]
  75. (\d{0,4})1(\d)(\d{36}) $(\11\2) секстилиона[ $3]
  76. (\d{1,5})1(\d{36}) $(\10) један секстилион[ $2]
  77. (\d{1,6})(\d{36}) $1 секстилиона[ $2]
  78. [-−](\d+) минус $1
  79. # Decimal code by https://twitter.com/_uranium_
  80. "([-−]?\d+)," $1| кома
  81. "([-−]?\d+,)([^0]\d)" $1 $2
  82. "([-−]?\d+,\d*[1-9]?)0+$" $1
  83. "([-−]?\d+,)(\d)(\d)(\d)" $1| |$2 |$3 |$4
  84. "([-−]?\d+,\d*)(\d)" $1 |$2
  85. == ordinal-number ==
  86. (\d+) \1.
  87. == help ==
  88. "" |$(1)|, |$(2)|, |$(3)|\n$(help ordinal-number)
  89. (.*) \1: |$(\1 1)|, |$(\1 2)|, |$(\1 3)|\n