da.sor 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ^0 nul
  2. 1$ en
  3. 1 et
  4. 2 to
  5. 3 tre
  6. 4 fire
  7. 5 fem
  8. 6 seks
  9. 7 syv
  10. 8 otte
  11. 9 ni
  12. 10 ti
  13. 11 elleve
  14. 12 tolv
  15. 13 tretten
  16. 14 fjorten
  17. 15 femten
  18. 16 seksten
  19. 17 sytten
  20. 18 atten
  21. 19 nitten
  22. 20 tyve
  23. 30 tredive
  24. 40 fyrre
  25. 50 halvtreds
  26. 60 tres
  27. 70 halvfjerds
  28. 80 firs
  29. 90 halvfems
  30. (\d)(\d) $2|og$(\10)
  31. (\d)(\d\d) $1 hundrede[ og $2]
  32. (\d{1,3})(\d{3}) $1 tusind[ og $2]
  33. a:1,0+
  34. a:\d+,0+ er
  35. a:1,(\d+) " og $1"
  36. a:\d+,(\d+) "er og $1"
  37. (\d{1,3})(\d{6}) $1| million$(a:\1,\2)
  38. (\d{1,3})(\d{9}) $1| milliard$(a:\1,\2)
  39. (\d{1,3})(\d{12}) $1| billion$(a:\1,\2)
  40. (\d{1,3})(\d{15}) $1| billiard$(a:\1,\2)
  41. (\d{1,3})(\d{18}) $1| trillion$(a:\1,\2)
  42. (\d{1,3})(\d{21}) $1| trilliard$(a:\1,\2)
  43. (\d{1,3})(\d{24}) $1| kvadrillion$(a:\1,\2)
  44. # negative number
  45. [-−](\d+) minus |$1
  46. # decimals
  47. ([-−]?\d+)[.,] $1| komma
  48. "([-−]?\d+[.,]0*)(\d+)" $1 |$2
  49. ([-−]?\d+[.,]\d*)(\d) $1| |$2
  50. # currency
  51. # unit/subunit singular/plural
  52. us:([^,]*),([^,]*),([^,]*),([^,]*) \1
  53. up:([^,]*),([^,]*),([^,]*),([^,]*) \2
  54. ss:([^,]*),([^,]*),([^,]*),([^,]*) \3
  55. sp:([^,]*),([^,]*),([^,]*),([^,]*) \4
  56. CHF:(\D+) $(\1: schweizisk franc, schweizisk franc, centime, centimes)
  57. CNY:(\D+) $(\1: renminbi yuan, renminbi yuan, fen, fen)
  58. DKK:(\D+) $(\1: dansk krone, danske kroner, øre, øre)
  59. EUR:(\D+) $(\1: euro, euro, cent, cent)
  60. GBP:(\D+) $(\1: pund sterling, pund sterling, penny, pence)
  61. ISK:(\D+) $(\1: islandsk krone, islandske kroner, eyrir, aurar)
  62. JPY:(\D+) $(\1: yen, yen, sen, sen)
  63. SEK:(\D+) $(\1: svensk krone, svenske kroner, öre, öre)
  64. USD:(\D+) $(\1: US dollar, US dollar, cent, cent)
  65. "([A-Z]{3}) ([-−]?1)([.,]00?)?" $2$(\1:us)
  66. "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2$(\1:up)
  67. "(CNY [-−]?\d+)[.,]10?" $1 $2 jiao
  68. "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 jiao
  69. "(CNY [-−]?\d+[.,]\d)1" $1 $2 fen
  70. "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 fen
  71. "(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 |$(1)$(\2:ss)
  72. "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 |$(\30)$(\2:sp)
  73. "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 |$3$(\2:sp)
  74. == ordinal ==
  75. ([-−]?\d+) $(ordinal |$1)
  76. nul nulte # 0
  77. en først # 1
  78. "(.*) en" \1 først # 1
  79. (.*)to \1anden # 2
  80. (.*)tre \1tredje # 3
  81. (.*)fire \1fjerde # 4
  82. (.*(fem|ellev|tolv|ard|on))(e|er)? \1te # 5, 11, 12, 10^6, 10^9 etc.
  83. (.*)seks \1sjette # 6
  84. (.*)tres \1tressende # 60
  85. (.*(syv|ott|ni|ti|tyv|trediv|fyrr|s))e? \1ende # 7, 8, 9, 10, 20, 30, 40, 50, 70, 80, 90
  86. (.*en) \1de # 13-19
  87. (.*tusind) \1e # 1000 etc.
  88. (.*) \1 # 100, etc.
  89. == ordinal-number ==
  90. (\d+) \1.
  91. == help ==
  92. "" |$(1)|, |$(2)|, |$(3)|\n$(help ordinal)$(help ordinal-number)
  93. (ordinal(-number)?) \1: |$(\1 1)|, |$(\1 2)|, |$(\1 3)|\n