zh.sor 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. # Mandarin Chinese number names (simplified)
  2. ^0 零
  3. 1 一
  4. 2 二
  5. 3 三
  6. 4 四
  7. 5 五
  8. 6 六
  9. 7 七
  10. 8 八
  11. 9 九
  12. ^1(\d) 十$1
  13. (\d)(\d) $1|十$2
  14. (\d)0{2} $1百
  15. (\d)0(\d) $1百零$2
  16. (\d)(\d\d) $1百$2
  17. (\d)0{3} $1千
  18. (\d)0(\d\d) $1千零$2
  19. (\d)(\d\d\d) $1千$2
  20. (\d{1,4})0{4} $1|万
  21. (\d{1,4})0(\d{3}) $1|万零$2
  22. (\d{1,4})(\d{4}) $1|万$2
  23. (\d{1,4})0{8} $1|亿
  24. (\d{1,4})0(\d{7}) $1|亿零$2
  25. (\d{1,4})(\d{8}) $1|亿$2
  26. (\d{1,4})0{12} $1|兆
  27. (\d{1,4})0(\d{11}) $1|兆零$2
  28. (\d{1,4})(\d{12}) $1|兆$2
  29. (\d{1,4})0{16} $1|京
  30. (\d{1,4})0(\d{15}) $1|京零$2
  31. (\d{1,4})(\d{16}) $1|京$2
  32. (\d{1,4})0{20} $1|垓
  33. (\d{1,4})0(\d{19}) $1|垓零$2
  34. (\d{1,4})(\d{20}) $1|垓$2
  35. (\d{1,4})0{24} $1|秭
  36. (\d{1,4})0(\d{23}) $1|秭零$2
  37. (\d{1,4})(\d{24}) $1|秭$2
  38. (\d{1,4})0{28} $1|穰
  39. (\d{1,4})0(\d{27}) $1|穰零$2
  40. (\d{1,4})(\d{28}) $1|穰$2
  41. (\d{1,4})0{32} $1|沟
  42. (\d{1,4})0(\d{31}) $1|沟零$2
  43. (\d{1,4})(\d{32}) $1|沟$2
  44. (\d{1,4})0{36} $1|涧
  45. (\d{1,4})0(\d{35}) $1|涧零$2
  46. (\d{1,4})(\d{36}) $1|涧$2
  47. (\d{1,4})0{40} $1|正
  48. (\d{1,4})0(\d{39}) $1|正零$2
  49. (\d{1,4})(\d{40}) $1|正$2
  50. (\d{1,4})0{44} $1|载
  51. (\d{1,4})0(\d{43}) $1|载零$2
  52. (\d{1,4})(\d{44}) $1|载$2
  53. # negative numbers
  54. [-−](\d+) 负|$1
  55. # decimals
  56. "([-−]?\d+)[.,]" "$1|点"
  57. "([-−]?\d+[.,]\d*)(\d)" $1||$2
  58. # currency
  59. # unit/subunit singular/plural
  60. AUD 澳元
  61. CHF 瑞士法郎
  62. CNY 人民币
  63. EUR 欧元
  64. GBP 英镑
  65. HKD 港币
  66. JPY 日圆
  67. MOP 澳门元
  68. USD 美元
  69. # 1/10 角
  70. # 1/100 分
  71. "([A-Z]{3}) ([-−]?\d+([.,]\d+)?)" $2$1
  72. # Mandarin Chinese number names, formal numbers (大写) for legal and financial documents, simplified
  73. == formal ==
  74. ^0 零
  75. 1 壹
  76. 2$ 贰
  77. 2 贰
  78. 3 叁
  79. 4 肆
  80. 5 伍
  81. 6 陆
  82. 7 柒
  83. 8 捌
  84. 9 玖
  85. ^1(\d) 拾$(formal \1)
  86. (\d)(\d) $(formal \1)|拾$(formal \2)
  87. (\d)0{2} $(formal \1)佰
  88. (\d)0(\d) $(formal \1)佰零$(formal \2)
  89. (\d)(\d\d) $(formal \1)佰$(formal \2)
  90. (\d)0{3} $(formal \1)仟
  91. (\d)0(\d\d) $(formal \1)仟零$(formal \2)
  92. (\d)(\d\d\d) $(formal \1)仟$(formal \2)
  93. (\d{1,4})0{4} $(formal \1)|万
  94. (\d{1,4})0(\d{3}) $(formal \1)|万零$(formal \2)
  95. (\d{1,4})(\d{4}) $(formal \1)|万$(formal \2)
  96. (\d{1,4})0{8} $(formal \1)|亿
  97. (\d{1,4})0(\d{7}) $(formal \1)|亿零$(formal \2)
  98. (\d{1,4})(\d{8}) $(formal \1)|亿$(formal \2)
  99. (\d{1,4})0{12} $(formal \1)|兆
  100. (\d{1,4})0(\d{11}) $(formal \1)|兆零$(formal \2)
  101. (\d{1,4})(\d{12}) $(formal \1)|兆$(formal \2)
  102. (\d{1,4})0{16} $(formal \1)|京
  103. (\d{1,4})0(\d{15}) $(formal \1)|京零$(formal \2)
  104. (\d{1,4})(\d{16}) $(formal \1)|京$(formal \2)
  105. (\d{1,4})0{20} $(formal \1)|垓
  106. (\d{1,4})0(\d{19}) $(formal \1)|垓零$(formal \2)
  107. (\d{1,4})(\d{20}) $(formal \1)|垓$(formal \2)
  108. (\d{1,4})0{24} $(formal \1)|秭
  109. (\d{1,4})0(\d{23}) $(formal \1)|秭零$(formal \2)
  110. (\d{1,4})(\d{24}) $(formal \1)|秭$(formal \2)
  111. (\d{1,4})0{28} $(formal \1)|穰
  112. (\d{1,4})0(\d{27}) $(formal \1)|穰零$(formal \2)
  113. (\d{1,4})(\d{28}) $(formal \1)|穰$(formal \2)
  114. (\d{1,4})0{32} $(formal \1)|沟
  115. (\d{1,4})0(\d{31}) $(formal \1)|沟零$(formal \2)
  116. (\d{1,4})(\d{32}) $(formal \1)|沟$(formal \2)
  117. (\d{1,4})0{36} $(formal \1)|涧
  118. (\d{1,4})0(\d{35}) $(formal \1)|涧零$(formal \2)
  119. (\d{1,4})(\d{36}) $(formal \1)|涧$(formal \2)
  120. (\d{1,4})0{40} $(formal \1)|正
  121. (\d{1,4})0(\d{39}) $(formal \1)|正零$(formal \2)
  122. (\d{1,4})(\d{40}) $(formal \1)|正$(formal \2)
  123. (\d{1,4})0{44} $(formal \1)|载
  124. (\d{1,4})0(\d{43}) $(formal \1)|载零$(formal \2)
  125. (\d{1,4})(\d{44}) $(formal \1)|载$(formal \2)
  126. # negative numbers
  127. [-−](\d+) 负|$(formal \1)
  128. # decimals
  129. "([-−]?\d+)[.,]" "$(formal \1)|点"
  130. "([-−]?\d+[.,]\d*)(\d)" $(formal \1)||$(formal \2)
  131. # currency
  132. # unit/subunit singular/plural
  133. AUD 澳元
  134. CHF 瑞士法郎
  135. CNY 人民币
  136. EUR 欧元
  137. GBP 英镑
  138. HKD 港币
  139. JPY 日圆
  140. MOP 澳门元
  141. USD 美元
  142. # 1/10 角
  143. # 1/100 分
  144. "([A-Z]{3}) ([-−]?\d+([.,]\d+)?)" $(formal \2)$(formal \1)
  145. == ordinal ==
  146. ([-−]?\d+) 第$1
  147. == ordinal-number ==
  148. (.*) \1.
  149. == help ==
  150. "" |$(1)|, |$(2)|, |$(3)|\n$(help formal)$(\0 ordinal)$(\0 ordinal-number)
  151. (formal|ordinal(-number)?) \1: |$(\1 1)|, |$(\1 2)|, |$(\1 3)|\n