pt.sor 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. ^0 zero
  2. 1 um
  3. 2 dois
  4. 3 três
  5. 4 quatro
  6. 5 cinco
  7. 6 seis
  8. 7 sete
  9. 8 oito
  10. 9 nove
  11. 10 dez
  12. 11 onze
  13. 12 doze
  14. 13 treze
  15. 14 quatorze
  16. 15 quinze
  17. 16 dezesseis # [:pt-BR:]
  18. 16 dezasseis
  19. 17 dezessete # [:pt-BR:]
  20. 17 dezassete
  21. 18 dezoito
  22. 19 dezenove # [:pt-BR:]
  23. 19 dezanove
  24. 20 vinte
  25. 30 trinta
  26. 40 quarenta
  27. 50 cinquenta
  28. 60 sessenta
  29. 70 setenta
  30. 80 oitenta
  31. 90 noventa
  32. (\d)(\d) $(\10) e $2
  33. 100 cem
  34. 1(\d\d) cento e $1
  35. 2(\d\d) duzentos[ e $1]
  36. 3(\d\d) trezentos[ e $1]
  37. 5(\d\d) quinhentos[ e $1]
  38. (\d)(\d\d) $1centos[ e $2]
  39. :0+
  40. :0*\d{1,2}(\d{6}){0,} " e " # mil e um, mil e dez
  41. :0*\d00(\d{6}){0,} " e " # mil e quinhentos
  42. :0*\d{1,2}000(\d{6}){0,} " e " # um milhão e onze mil
  43. :0*\d{1}00000(\d{6}){0,} " e " # um milhão e cem mil
  44. :\d+ " "
  45. pl:1 ão # milhão
  46. pl:.* ões # milhões
  47. 1(\d\d\d) mil$(:\1)$1
  48. (\d{1,3})(\d\d\d) $1 mil$(:\2)$2
  49. (\d{1,3})(\d{6}) $1 milh$(pl:\1)$(:\2)$2 # [:pt-BR:]
  50. (\d{1,3})(\d{9}) $1 bilh$(pl:\1)$(:\2)$2 # [:pt-BR:]
  51. (\d{1,3})(\d{12}) $1 trilh$(pl:\1)$(:\2)$2 # [:pt-BR:]
  52. (\d{1,3})(\d{15}) $1 quatrilh$(pl:\1)$(:\2)$2 # [:pt-BR:]
  53. (\d{1,3})(\d{18}) $1 quintilh$(pl:\1)$(:\2)$2 # [:pt-BR:]
  54. (\d{1,3})(\d{18}) $1 sextilh$(pl:\1)$(:\2)$2 # [:pt-BR:]
  55. (\d{1,3})(\d{24}) $1 septilh$(pl:\1)$(:\2)$2 # [:pt-BR:]
  56. (\d{1,6})(\d{6}) $1 milh$(pl:\1)$(:\2)$2
  57. (\d{1,6})(\d{12}) $1 bili$(pl:\1)$(:\2)$2
  58. (\d{1,6})(\d{18}) $1 trili$(pl:\1)$(:\2)$2
  59. (\d{1,6})(\d{24}) $1 quatrili$(pl:\1)$(:\2)$2
  60. # negative number
  61. [-−](\d\d*) menos |$1
  62. # decimals
  63. ([-−]?\d+)[.] $1| ponto
  64. ([-−]?\d+)[,] $1| vírgula
  65. ([-−]?\d+[.,])([^0]\d) $1| |$2
  66. "([-−]?\d+[.,])(\d)(\d)(\d)" |$1 |$2| |$3| |$4
  67. ([-−]?\d+[.,]\d*)(\d) $1| |$2
  68. # currency (monedas)
  69. # unit/subunit singular/plural
  70. us:([^,]*),([^,]*),([^,]*),([^,]*) \1
  71. up:([^,]*),([^,]*),([^,]*),([^,]*) \2
  72. ss:([^,]*),([^,]*),([^,]*),([^,]*) \3
  73. sp:([^,]*),([^,]*),([^,]*),([^,]*) \4
  74. AOA:(\D+) $(\1: kwanza, kwanzas, cêntimo, cêntimos)
  75. ARG:(\D+) $(\1: peso argentino, pesos argentinos, centavo, centavos)
  76. BOB:(\D+) $(\1: boliviano, bolivianos, centavo, centavos)
  77. BRL:(\D+) $(\1: real, reais, centavo, centavos) # [:pt-BR:]
  78. BRL:(\D+) $(\1: real, réis, centavo, centavos)
  79. CHF:(\D+) $(\1: franco suíço, francos suíços, cêntimo, cêntimos)
  80. CNY:(\D+) $(\1: yuan renminbi, yuan renminbi, fen, fen)
  81. CVE:(\D+) $(\1: escudos cabo-verdianos, escudos cabo-verdianos, centavo, centavos)
  82. EUR:(\D+) $(\1: euro, euros, cent, cents)
  83. GBP:(\D+) $(\1: libra esterlina, libras esterlinas, penny, pence)
  84. JPY:(\D+) $(\1: iene, ienes, sen, sen)
  85. MOP:(\D+) $(\1: pataca, patacas, avo, avos)
  86. MXN:(\D+) $(\1: peso mexicano, pesos mexicanos, centavo, centavos)
  87. MZM:(\D+) $(\1: metical, meticais, centavo, centavos)
  88. STD:(\D+) $(\1: dobra, dobras, cêntimo, cêntimos)
  89. USD:(\D+) $(\1: dólar americano, dólares americanos, cêntimo, cêntimos)
  90. XOF:(\D+) $(\1: franco CFA, francos CFA, cêntimo, cêntimos)
  91. # masculine to feminine conversion of "un" after millions,
  92. # if "as?$" matches currency name
  93. f:(.*il[hi])(.*),(.*) \1$(f:\2,\3) # don't modify millions
  94. f:(.*um)([^a].*,|,)(.*as?) $(f:\1a\2\3) # um libra -> uma libra
  95. f:(.*d)oi(s.*),(.*as?) $(f:\1ua\2,\3) # dois libra -> duas libra
  96. f:(.*ent)o(s.*),(.*as?) $(f:\1a\2,\3) # duzentos libra -> duzentas libra
  97. f:(.*),(.*) \1\2
  98. "([A-Z]{3}) ([-−]?1)([.,]00?)?"$(f:|$2,$(\1:us))
  99. "([A-Z]{3}) ([-−]?\d+0{6,})([.,]00?)?" $2 de$(\1:up)
  100. "([A-Z]{3}) ([-−]?\d+)([.,]00?)?"$(f:|$2,$(\1:up))
  101. "(CNY [-−]?\d+)[.,]10?" $1 $2 jiao
  102. "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 jiao
  103. "(CNY [-−]?\d+[.,]\d)1" $1 $2 fen
  104. "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 fen
  105. "(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 e |$(1)$(\2:ss)
  106. "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 e |$(\30)$(\2:sp)
  107. "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 e |$3$(\2:sp)
  108. == feminine ==
  109. ([-−]?\d+) $(feminine $1)
  110. (.*)um \1uma
  111. (.*)dois(.*) $(feminine \1duas\2)
  112. (.*) \1
  113. == masculine ==
  114. ([-−]?\d+) $1
  115. == ordinal(-masculine)? ==
  116. 1 primeiro
  117. 2 segundo
  118. 3 terceiro
  119. 4 quarto
  120. 5 quinto
  121. 6 sexto
  122. 7 sétimo
  123. 8 oitavo
  124. 9 nono
  125. 10 décimo
  126. 20 vigésimo
  127. 30 trigésimo
  128. 40 cuadragésimo
  129. 50 quincuagésimo
  130. 60 sexagésimo
  131. 70 septuagésimo
  132. 80 octogésimo
  133. 90 nonagésimo
  134. (\d)(\d) $(ordinal \20) $(ordinal \3)
  135. 100 centésimo
  136. 200 ducentésimo
  137. 300 trecentésimo
  138. 400 quadrigentésimo
  139. 500 quingentésimo
  140. 600 sexcentésimo
  141. 700 septicentésimo
  142. 800 octigentésimo
  143. 900 nongentésimo
  144. (\d)(\d\d) $(ordinal \200) $(ordinal \3)
  145. 1(\d{3}) milésimo[ $(ordinal \2)]
  146. (\d)(\d{3}) $2 milésimo[ $(ordinal \3)]
  147. 1(\d{6}) milionésimo[ $(ordinal \2)]
  148. (\d{1,3})(\d{6}) $2 milionésimo[ $(ordinal \3)]
  149. 1(\d{9}) bilionésimo[ $(ordinal \2)]
  150. (\d{1,3})(\d{9}) $2 bilionésimo[ $(ordinal \3)]
  151. == ordinal-feminine ==
  152. ([-−]?\d+) $(ordinal-feminine $(ordinal-masculine \1))
  153. (.*)o\b(.*) $(ordinal-feminine \1a\2)
  154. (.*) \1
  155. == (ordinal)-number(-feminine|-masculine)? ==
  156. ([-−]?\d+) \3$(ordinal-number $(\1\2 \3))
  157. .*er .ᵉʳ
  158. .*a .ª
  159. .*o .º
  160. == help ==
  161. "" $(1)|, $(2), $(3)\n$(\0 feminine)$(\0 masculine)$(\0 ordinal-feminine)$(\0 ordinal-masculine)$(\0 ordinal-number-feminine)$(\0 ordinal-number-masculine)
  162. (feminine|masculine|ordinal(-number)?(-feminine|-masculine)?) \1: $(\1 1), $(\1 2), $(\1 3)\n