af.sor 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ^0$ nul
  2. 1 een
  3. 2 twee
  4. 3 drie
  5. 4 vier
  6. 5 vyf
  7. 6 ses
  8. 7 sewe
  9. 8 agt
  10. 9 nege
  11. 10 tien
  12. 11 elf
  13. 12 twaalf
  14. 13 dertien
  15. 14 veertien
  16. 17 sewentien
  17. 18 agtien
  18. 19 negentien
  19. 1(\d) $1|tien
  20. 20 twintig
  21. 30 dertig
  22. 40 veertig
  23. 70 sewentig
  24. 80 tagtig
  25. 90 negentig
  26. (\d)0 $1tig
  27. (\d)(\d) $2-en-$(\10)
  28. # function a
  29. a:0* " " # eenhonderd
  30. a:0*1?\d -en- # eenhonderd-en-een
  31. a:0*\d0 -en- # eenhonderd-en-twintig
  32. a:\d+ " " # eenhonderd een-en-twintig
  33. # function b
  34. b:0*1?\d # negentienduisend
  35. b:0*\d0 # twintigduisend
  36. b:\d+ " " # een-en-twintig duisend
  37. ^1(\d\d) honderd$(a:\1)$1
  38. (\d)(\d\d) $1honderd$(a:\2)$2
  39. ^1(\d{3}) duisend$(a:\1)$1
  40. (\d{1,3})(\d{3}) $1$(b:\1)duisend$(a:\2)$2
  41. (\d{1,3})(\d{6}) $1$(b:\1)miljoen$(a:\2)$2
  42. (\d{1,3})(\d{9}) $1$(b:\1)miljard$(a:\2)$2
  43. (\d{1,3})(\d{12}) $1$(b:\1)biljoen$(a:\2)$2
  44. (\d{1,3})(\d{15}) $1$(b:\1)biljard$(a:\2)$2
  45. (\d{1,3})(\d{18}) $1$(b:\1)triljoen$(a:\2)$2
  46. (\d{1,3})(\d{21}) $1$(b:\1)triljard$(a:\2)$2
  47. # negative number
  48. [-−](\d+) min |$1
  49. # decimals
  50. ([-−]?\d+)[.,] $1| komma
  51. ([-−]?\d+[.,]\d*)(\d) $1| |$2
  52. # currencies
  53. # unit/subunit
  54. u:([^,]*),([^,]*),([^,]*) \1
  55. s:([^,]*),([^,]*),([^,]*) \2
  56. p:([^,]*),([^,]*),([^,]*) \3
  57. CHF:(.) $(\1: Zwitserse franc, centime, centimes)
  58. CNY:(.) $(\1: renminbi yuan, fen, fen)
  59. EUR:(.) $(\1: euro, cent, cent)
  60. GBP:(.) $(\1: pond sterling, penny, pence)
  61. JPY:(.) $(\1: yen, sen, sen)
  62. USD:(.) $(\1: Amerikaanse dollar, sent, sent)
  63. ZAR:(.) $(\1: rand, sent, sent)
  64. "(JPY [-−]?\d+)[.,](\d\d)0" $1
  65. "(JPY [-−]?\d+[.,]\d\d)(\d)" $1 $2 rin
  66. "([A-Z]{3}) ([-−]?0)([.,]00?)?" nul$(\1:u)
  67. "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2$(\1:u)
  68. "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 jiao
  69. "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 fen
  70. "(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 een$(\2:s)
  71. "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 $(\30)$(\2:p)
  72. "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 $3$(\2:p)
  73. == ordinal ==
  74. ([-−]?([24-6]|\d*1\d|\d+0[24-6])) $1|de
  75. ([-−]?([79]|\d+0[79])) $1|nde
  76. ([-−]?\d+) $(ordinal |$1)
  77. (.*)een \1eerste
  78. (.*)drie \1derde
  79. (.*) \1ste
  80. == ordinal-number ==
  81. ([-−]?([2-79]|\d*1\d|\d+0[2-79])) \1de
  82. ([-−]?\d+) \1ste
  83. == help ==
  84. "" $(1), $(2), $(3)\n$(help ordinal)$(help ordinal-number)
  85. (ordinal(-number)?) \1: $(\1 1), $(\1 2), $(\1 3)\n