sh.sor 2.7 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 nula
  14. 1 jedan
  15. 2 dva
  16. 3 tri
  17. 4 četiri
  18. 5 pet
  19. 6 šest
  20. 7 sedam
  21. 8 osam
  22. 9 devet
  23. 10 deset
  24. 11 jedanaest
  25. 14 četrnaest
  26. 16 šesnaest
  27. 1(\d) $1naest
  28. 4(\d) četrdeset[ $1]
  29. 5(\d) pedeset[ $1]
  30. 6(\d) šezdeset[ $1]
  31. 9(\d) devedeset[ $1]
  32. (\d)(\d) $1deset[ $2]
  33. 1(\d\d) sto[ $1]
  34. 2(\d\d) dvesta[ $1]
  35. 3(\d\d) trista[ $1]
  36. (\d)(\d\d) $1sto[ $2]
  37. 1(\d\d\d) hiljadu[ $1]
  38. 2(\d\d\d) dve hiljade[ $1]
  39. ([34])(\d\d\d) $1 hiljade[ $2]
  40. (\d{0,1})1(\d)(\d\d\d) $(\11\2) hiljada[ $3]
  41. (\d{1,2})1(\d\d\d) $(\10) jedna hiljada[ $2]
  42. (\d{1,2})2(\d\d\d) $(\10) dve hiljade[ $2]
  43. (\d{1,2})([34])(\d\d\d) $(\10) $2 hiljade[ $3]
  44. (\d{1,3})(\d\d\d) $1 hiljada[ $2]
  45. 1(\d{6}) milion[ $1]
  46. (\d{0,4})1(\d)(\d{6}) $(\11\2) miliona[ $3]
  47. (\d{1,5})1(\d{6}) $(\10) jedan milion[ $2]
  48. (\d{1,3})(\d{6}) $1 miliona[ $2]
  49. 1(\d{9}) milijarda[ $1]
  50. 2(\d{9}) dve milijarde[ $1]
  51. ([34])(\d{9}) $1 milijarde[ $2]
  52. (\d{1,2})0(\d{9}) $(\10) milijardi[ $2]
  53. (\d{0,1})1(\d)(\d{9}) $(\11\2) milijardi[ $3]
  54. (\d{1,2})1(\d{9}) $(\10) jedna milijarda[ $2]
  55. (\d{1,2})2(\d{9}) $(\10) dve milijarde[ $2]
  56. (\d{1,2})([34])(\d{9}) $(\10) $2 milijarde[ $3]
  57. (\d{1,3})(\d{9}) $1 milijarde[ $2]
  58. 1(\d{12}) bilion[ $1]
  59. (\d{0,4})1(\d)(\d{12}) $(\11\2) biliona[ $3]
  60. (\d{1,5})1(\d{12}) $(\10) jedan bilion[ $2]
  61. (\d{1,6})(\d{12}) $1 biliona[ $2]
  62. 1(\d{18}) trilion[ $1]
  63. (\d{0,4})1(\d)(\d{18}) $(\11\2) triliona[ $3]
  64. (\d{1,5})1(\d{18}) $(\10) jedan trilion[ $2]
  65. (\d{1,6})(\d{18}) $1 triliona[ $2]
  66. 1(\d{24}) kvadrilion[ $1]
  67. (\d{0,4})1(\d)(\d{24}) $(\11\2) kvadriliona[ $3]
  68. (\d{1,5})1(\d{24}) $(\10) jedan kvadrilion[ $2]
  69. (\d{1,6})(\d{24}) $1 kvadriliona[ $2]
  70. 1(\d{30}) kvintilion[ $1]
  71. (\d{0,4})1(\d)(\d{30}) $(\11\2) kvintiliona[ $3]
  72. (\d{1,5})1(\d{30}) $(\10) jedan kvintilion[ $2]
  73. (\d{1,6})(\d{30}) $1 kvintiliona[ $2]
  74. 1(\d{36}) sekstilion[ $1]
  75. (\d{0,4})1(\d)(\d{36}) $(\11\2) sekstiliona[ $3]
  76. (\d{1,5})1(\d{36}) $(\10) jedan sekstilion[ $2]
  77. (\d{1,6})(\d{36}) $1 sekstiliona[ $2]
  78. [-−](\d+) minus $1
  79. # Decimal code by https://twitter.com/_uranium_
  80. "([-−]?\d+)," $1| koma
  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