Debian Codegraph @

data/en.sor

raw
1 ^0 zero
2 1 one
3 2 two
4 3 three
5 4 four
6 5 five
7 6 six
8 7 seven
9 8 eight
10 9 nine
11 10 ten
12 11 eleven
13 12 twelve
14 13 thirteen
15 15 fifteen
16 18 eighteen
17 1(\d) $1teen
18 2(\d) twenty[-$1]
19 3(\d) thirty[-$1]
20 4(\d) forty[-$1]
21 5(\d) fifty[-$1]
22 8(\d) eighty[-$1]
23 (\d)(\d) $1ty[-$2]
24
25 # separator function
26 :0+ # one million
27 :0*\d?\d " and " # one million and twenty-two
28 :\d+ ", " # one million, one thousand
29
30 (\d)(\d\d) $1 hundred[ and $2] # one hundred and one [:en-AU:] [:en-GB:] [:en-IE:] [:en-NZ:]
31 (\d)(\d\d) $1 hundred[ $2] # default: one hundred one
32 (\d{1,2})([1-9]\d\d) $1 thousand[ $2] # ten thousand two hundred
33
34 (\d{1,2})(\d{3}) $1 thousand$(:\2)$2 # [:en-IN:] one hundred thousand, two hundred
35 (\d{1,2})(000\d\d) $1 lakh$(:\2)$2 # [:en-IN:] one lakh and two
36 (\d{1,2})(\d{5}) $1 lakh[ $2] # [:en-IN:] one lakh two hundred
37 (\d{1,4})(\d{7}) $1 crore$(:\2)$2 # [:en-IN:]
38
39 (\d{1,3})(\d{3}) $1 thousand$(:\2)$2 # one hundred thousand, two hundred
40 (\d{1,3})(\d{6}) $1 million$(:\2)$2
41 (\d{1,3})(\d{9}) $1 billion$(:\2)$2
42 (\d{1,3})(\d{12}) $1 trillion$(:\2)$2
43 (\d{1,3})(\d{15}) $1 quadrillion$(:\2)$2
44 (\d{1,3})(\d{18}) $1 quintillion$(:\2)$2
45 (\d{1,3})(\d{21}) $1 sextillion$(:\2)$2
46 (\d{1,3})(\d{24}) $1 septillion$(:\2)$2
47 (\d{1,3})(\d{27}) $1 octillion$(:\2)$2
48 (\d{1,3})(\d{30}) $1 nonillion$(:\2)$2
49 (\d{1,3})(\d{33}) $1 decillion$(:\2)$2
50 (\d{1,3})(\d{36}) $1 undecillion$(:\2)$2
51 (\d{1,3})(\d{39}) $1 duodecillion$(:\2)$2
52 (\d{1,3})(\d{42}) $1 tredecillion$(:\2)$2
53
54 # negative number
55
56 [-−](\d+) negative |$1
57
58 # decimals
59
60 0[.,] point
61 ([-−]?\d+)[.,] $1| point
62 ([-−]?\d+[.,]\d*)(\d) $1| |$2
63
64 # currency
65
66 # unit/subunit singular/plural
67
68 us:([^,]*),([^,]*),([^,]*),([^,]*) \1
69 up:([^,]*),([^,]*),([^,]*),([^,]*) \2
70 ss:([^,]*),([^,]*),([^,]*),([^,]*) \3
71 sp:([^,]*),([^,]*),([^,]*),([^,]*) \4
72
73 AUD:(\D+) $(\1: Australian dollar, Australian dollars, cent, cents)
74 BGN:(\D+) $(\1: lev, leva, stotinka, stotinki)
75 BWP:(\D+) $(\1: pula, pula, thebe, thebe)
76 BZD:(\D+) $(\1: Belize dollar, Belize dollars, cent, cents)
77 CAD:(\D+) $(\1: Canadian dollar, Canadian dollars, cent, cents)
78 CHF:(\D+) $(\1: Swiss franc, Swiss francs, centime, centimes)
79 CNY:(\D+) $(\1: Chinese yuan, Chinese yuan, fen, fen)
80 CZK:(\D+) $(\1: Czech koruna, Czech koruny, halér, halére)
81 DKK:(\D+) $(\1: Danish krone, Danish kroner, øre, øre)
82 EEK:(\D+) $(\1: kroon, kroonid, sent, senti)
83 EUR:(\D+) $(\1: euro, euro, cent, cents)
84 GBP:(\D+) $(\1: pound sterling, pounds sterling, penny, pence)
85 GHS:(\D+) $(\1: Ghana cedi, Ghana cedis, pesewa, pesewas)
86 GMD:(\D+) $(\1: dalasi, dalasi, butut, bututs)
87 HKD:(\D+) $(\1: Hong Kong dollar, Hong Kong dollars, cent, cents)
88 HRK:(\D+) $(\1: kuna, kuna, lipa, lipa)
89 HUF:(\D+) $(\1: forint, forint, fillér, fillér)
90 ILS:(\D+) $(\1: Israeli shekel, Israeli shekels, agora, agoras)
91 INR:(\D+) $(\1: Indian rupee, Indian rupees, paisa, paise)
92 JMD:(\D+) $(\1: Jamaica dollar, Jamaica dollars, cent, cents)
93 JPY:(\D+) $(\1: Japanese yen, Japanese yen, sen, sen)
94 KES:(\D+) $(\1: Kenyan shilling, Kenyan shillings, cent, cents)
95 KRW:(\D+) $(\1: Korean won, Korean won, jeon, jeon)
96 LKR:(\D+) $(\1: Sri Lankan rupee, Sri Lankan rupees, cent, cents)
97 LRD:(\D+) $(\1: Liberian dollar, Liberian dollars, cent, cents)
98 LSL:(\D+) $(\1: loti, maloti, sente, lisente)
99 LTL:(\D+) $(\1: litas, litai, centas, centai)
100 LVL:(\D+) $(\1: lats, lati, santims, santimi)
101 MGA:(\D+) $(\1: ariary, ariaries, iraimbilanja, iraimbilanja)
102 MUR:(\D+) $(\1: Mauritian rupee, Mauritian rupees, cent, cents)
103 MXN:(\D+) $(\1: Mexican peso, Mexican pesos, centavo, centavos)
104 MWK:(\D+) $(\1: Malawian kwacha, Malawian kwacha, tambala, tambala)
105 MYR:(\D+) $(\1: Ringgit, Ringgit, cent, cents)
106 NAD:(\D+) $(\1: Namibian dollar, Namibian dollars, cent, cents)
107 NGN:(\D+) $(\1: naira, naira, kobo, kobo)
108 NZD:(\D+) $(\1: New Zealand dollar, New Zealand dollars, cent, cents)
109 PGK:(\D+) $(\1: kina, kina, toea, toea)
110 PHP:(\D+) $(\1: Philippine peso, Philippine pesos, centavo, centavos)
111 PKR:(\D+) $(\1: Pakistani rupee, Pakistani rupees, paisa, paise)
112 PLN:(\D+) $(\1: zloty, zlotys, grosz, groszy)
113 RON:(\D+) $(\1: Romanian leu, Romanian lei, ban, bani)
114 RSD:(\D+) $(\1: Serbian dinar, Serbian dinars, para, para)
115 RUB:(\D+) $(\1: Russian ruble, Russian rubles, kopek, kopeks)
116 RWF:(\D+) $(\1: Rwandese franc, Rwandese francs, centime, centimes)
117 SDG:(\D+) $(\1: Sudanese pound, Sudanese pounds, piastre, piastres)
118 SGD:(\D+) $(\1: Singapore dollar, Singapore dollars, cent, cents)
119 SLL:(\D+) $(\1: leone, leones, cent, cents)
120 SZL:(\D+) $(\1: lilangeni, emalangeni, cent, cents)
121 THB:(\D+) $(\1: baht, baht, satang, satang)
122 TRY:(\D+) $(\1: Turkish lira, Turkish lira, kurus, kurus)
123 TTD:(\D+) $(\1: Trinidad and Tobago dollar, Trinidad and Tobago dollars, cent, cents)
124 TZS:(\D+) $(\1: Tanzanian shilling, Tanzanian shillings, cent, cents)
125 UAH:(\D+) $(\1: hryvnia, hryvnia, kopiyka, kopiyka)
126 UGX:(\D+) $(\1: Uganda shilling, Uganda shillings, cent, cents)
127 USD:(\D+) $(\1: U.S. dollar, U.S. dollars, cent, cents)
128 X[AO]F:(\D+) $(\1: CFA franc, CFA francs, centime, centimes)
129 ZAR:(\D+) $(\1: South African rand, South African rand, cent, cents)
130 ZMW:(\D+) $(\1: Zambian kwacha, Zambian kwacha, ngwee, ngwee)
131 ZW[DL]:(\D+) $(\1: Zimbabwe dollar, Zimbabwe dollars, cent, cents)
132
133 "(JPY [-−]?\d+)[.,](\d\d)0" $1
134 "(JPY [-−]?\d+[.,]\d\d)(\d)" $1 $2 rin
135
136 "([A-Z]{3}) ([-−]?1)([.,]00?)?" $2$(\1:us)
137 "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2$(\1:up)
138
139 "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 jiao
140 "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 fen
141
142 "((MGA|MRO) [-−]?\d+)[.,]0" $1
143 "((MGA|MRO) [-−]?\d+)[.,]2" $1 and |$(1)$(\2:ss)
144 "((MGA|MRO) [-−]?\d+)[.,]4" $1 and |$(2)$(\2:sp)
145 "((MGA|MRO) [-−]?\d+)[.,]6" $1 and |$(3)$(\2:sp)
146 "((MGA|MRO) [-−]?\d+)[.,]8" $1 and |$(4)$(\2:sp)
147
148 "(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 and |$(1)$(\2:ss)
149 "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 and |$(\30)$(\2:sp)
150 "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 and |$3$(\2:sp)
151
152 == money ==
153
154 "(JPY [-−]?\d+)[.,](\d\d)0" $1
155 "(JPY [-−]?\d+[.,]\d\d)(\d)" $1 $2 rin
156
157 "([A-Z]{3}) ([-−]?1)([.,]00?)?" $2$(\1:us)
158 "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2$(\1:up)
159
160 "(CNY [-−]?\d+)[.,](\d)0?" $1 $2 jiao
161 "(CNY [-−]?\d+[.,]\d)(\d)" $1 $2 fen
162
163 "(MGA|MRO) ([-−]?\d+)[.,]0" $2$(\1:us)
164 "(MGA|MRO) ([-−]?\d+)[.,]2" $2 and 1/5$(\1:us)
165 "(MGA|MRO) ([-−]?\d+)[.,]4" $2 and 2/5$(\1:up)
166 "(MGA|MRO) ([-−]?\d+)[.,]6" $2 and 3/5$(\1:up)
167 "(MGA|MRO) ([-−]?\d+)[.,]8" $2 and 4/5$(\1:up)
168
169 "([A-Z]{3}) ([-−]?1)" $2$(\1:us)
170 "([A-Z]{3}) ([-−]?\d+)" $2$(\1:up)
171 "(([A-Z]{3}) ([-−]?\d+))[.,](01)" $3 and 1/100$(\2:us)
172 "(([A-Z]{3}) ([-−]?\d+))[.,](\d)" $3 and \40/100$(\2:up)
173 "(([A-Z]{3}) ([-−]?\d+))[.,](\d\d)" $3 and \4/100$(\2:up)
174 "(([A-Z]{3}) ([-−]?\d+))[.,](\d\d\d)" $3 and \4/1000$(\2:up)
175
176 == ordinal ==
177
178 # convert to text, and recall to convert
179 # cardinal names to ordinal ones
180
181 ([-−]?\d+) $(ordinal |$1)
182
183 (.*)one \1first
184 (.*)two \1second
185 (.*)three \1third
186 (.*)five \1fifth
187 (.*)eight \1eighth
188 (.*)nine \1ninth
189 (.*)twelve \1twelfth
190 (.*)y \1ieth
191 (.*) \1th
192
193 == ordinal-number ==
194
195 (.*1\d) \1th
196 (.*1) \1st
197 (.*2) \1nd
198 (.*3) \1rd
199 (.*) \1th
200
201 == year ==
202
203 (1[1-9])00 $1 hundred
204 (1[1-9])([0-9][0-9]) $1 $2
205 (.*) $(year-remove-and $1)
206
207 == year-remove-and ==
208
209 "(.*) and (.*)" \1 \2
210 (.*) \1
211
212 == help ==
213
214 "" $(1)|, $(2), $(3)\n$(\0 ordinal)$(\0 ordinal-number)year: $(year 1999), two thousand, $(year 2001)\ncurrency \(for example, USD\): $(USD 2.5)\nmoney USD: $(money USD 2.5)
215 "(ordinal(-number)?|USD)" \1: $(\1 1), $(\1 2), $(\1 3)\n
216