common_data_en.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 #
3 # Copyright 2017 Mycroft AI Inc.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 from collections import OrderedDict
18 
19 
20 _ARTICLES = {'a', 'an', 'the'}
21 
22 
23 _NUM_STRING_EN = {
24  0: 'zero',
25  1: 'one',
26  2: 'two',
27  3: 'three',
28  4: 'four',
29  5: 'five',
30  6: 'six',
31  7: 'seven',
32  8: 'eight',
33  9: 'nine',
34  10: 'ten',
35  11: 'eleven',
36  12: 'twelve',
37  13: 'thirteen',
38  14: 'fourteen',
39  15: 'fifteen',
40  16: 'sixteen',
41  17: 'seventeen',
42  18: 'eighteen',
43  19: 'nineteen',
44  20: 'twenty',
45  30: 'thirty',
46  40: 'forty',
47  50: 'fifty',
48  60: 'sixty',
49  70: 'seventy',
50  80: 'eighty',
51  90: 'ninety'
52 }
53 
54 
55 _FRACTION_STRING_EN = {
56  2: 'half',
57  3: 'third',
58  4: 'forth',
59  5: 'fifth',
60  6: 'sixth',
61  7: 'seventh',
62  8: 'eigth',
63  9: 'ninth',
64  10: 'tenth',
65  11: 'eleventh',
66  12: 'twelveth',
67  13: 'thirteenth',
68  14: 'fourteenth',
69  15: 'fifteenth',
70  16: 'sixteenth',
71  17: 'seventeenth',
72  18: 'eighteenth',
73  19: 'nineteenth',
74  20: 'twentyith'
75 }
76 
77 
78 _LONG_SCALE_EN = OrderedDict([
79  (100, 'hundred'),
80  (1000, 'thousand'),
81  (1000000, 'million'),
82  (1e12, "billion"),
83  (1e18, 'trillion'),
84  (1e24, "quadrillion"),
85  (1e30, "quintillion"),
86  (1e36, "sextillion"),
87  (1e42, "septillion"),
88  (1e48, "octillion"),
89  (1e54, "nonillion"),
90  (1e60, "decillion"),
91  (1e66, "undecillion"),
92  (1e72, "duodecillion"),
93  (1e78, "tredecillion"),
94  (1e84, "quattuordecillion"),
95  (1e90, "quinquadecillion"),
96  (1e96, "sedecillion"),
97  (1e102, "septendecillion"),
98  (1e108, "octodecillion"),
99  (1e114, "novendecillion"),
100  (1e120, "vigintillion"),
101  (1e306, "unquinquagintillion"),
102  (1e312, "duoquinquagintillion"),
103  (1e336, "sesquinquagintillion"),
104  (1e366, "unsexagintillion")
105 ])
106 
107 
108 _SHORT_SCALE_EN = OrderedDict([
109  (100, 'hundred'),
110  (1000, 'thousand'),
111  (1000000, 'million'),
112  (1e9, "billion"),
113  (1e12, 'trillion'),
114  (1e15, "quadrillion"),
115  (1e18, "quintillion"),
116  (1e21, "sextillion"),
117  (1e24, "septillion"),
118  (1e27, "octillion"),
119  (1e30, "nonillion"),
120  (1e33, "decillion"),
121  (1e36, "undecillion"),
122  (1e39, "duodecillion"),
123  (1e42, "tredecillion"),
124  (1e45, "quattuordecillion"),
125  (1e48, "quinquadecillion"),
126  (1e51, "sedecillion"),
127  (1e54, "septendecillion"),
128  (1e57, "octodecillion"),
129  (1e60, "novendecillion"),
130  (1e63, "vigintillion"),
131  (1e66, "unvigintillion"),
132  (1e69, "uuovigintillion"),
133  (1e72, "tresvigintillion"),
134  (1e75, "quattuorvigintillion"),
135  (1e78, "quinquavigintillion"),
136  (1e81, "qesvigintillion"),
137  (1e84, "septemvigintillion"),
138  (1e87, "octovigintillion"),
139  (1e90, "novemvigintillion"),
140  (1e93, "trigintillion"),
141  (1e96, "untrigintillion"),
142  (1e99, "duotrigintillion"),
143  (1e102, "trestrigintillion"),
144  (1e105, "quattuortrigintillion"),
145  (1e108, "quinquatrigintillion"),
146  (1e111, "sestrigintillion"),
147  (1e114, "septentrigintillion"),
148  (1e117, "octotrigintillion"),
149  (1e120, "noventrigintillion"),
150  (1e123, "quadragintillion"),
151  (1e153, "quinquagintillion"),
152  (1e183, "sexagintillion"),
153  (1e213, "septuagintillion"),
154  (1e243, "octogintillion"),
155  (1e273, "nonagintillion"),
156  (1e303, "centillion"),
157  (1e306, "uncentillion"),
158  (1e309, "duocentillion"),
159  (1e312, "trescentillion"),
160  (1e333, "decicentillion"),
161  (1e336, "undecicentillion"),
162  (1e363, "viginticentillion"),
163  (1e366, "unviginticentillion"),
164  (1e393, "trigintacentillion"),
165  (1e423, "quadragintacentillion"),
166  (1e453, "quinquagintacentillion"),
167  (1e483, "sexagintacentillion"),
168  (1e513, "septuagintacentillion"),
169  (1e543, "ctogintacentillion"),
170  (1e573, "nonagintacentillion"),
171  (1e603, "ducentillion"),
172  (1e903, "trecentillion"),
173  (1e1203, "quadringentillion"),
174  (1e1503, "quingentillion"),
175  (1e1803, "sescentillion"),
176  (1e2103, "septingentillion"),
177  (1e2403, "octingentillion"),
178  (1e2703, "nongentillion"),
179  (1e3003, "millinillion")
180 ])
181 
182 
183 _ORDINAL_STRING_BASE_EN = {
184  1: 'first',
185  2: 'second',
186  3: 'third',
187  4: 'fourth',
188  5: 'fifth',
189  6: 'sixth',
190  7: 'seventh',
191  8: 'eighth',
192  9: 'ninth',
193  10: 'tenth',
194  11: 'eleventh',
195  12: 'twelfth',
196  13: 'thirteenth',
197  14: 'fourteenth',
198  15: 'fifteenth',
199  16: 'sixteenth',
200  17: 'seventeenth',
201  18: 'eighteenth',
202  19: 'nineteenth',
203  20: 'twentieth',
204  30: 'thirtieth',
205  40: "fortieth",
206  50: "fiftieth",
207  60: "sixtieth",
208  70: "seventieth",
209  80: "eightieth",
210  90: "ninetieth",
211  10e3: "hundredth",
212  1e3: "thousandth"
213 }
214 
215 
216 _SHORT_ORDINAL_STRING_EN = {
217  1e6: "millionth",
218  1e9: "billionth",
219  1e12: "trillionth",
220  1e15: "quadrillionth",
221  1e18: "quintillionth",
222  1e21: "sextillionth",
223  1e24: "septillionth",
224  1e27: "octillionth",
225  1e30: "nonillionth",
226  1e33: "decillionth"
227  # TODO > 1e-33
228 }
229 _SHORT_ORDINAL_STRING_EN.update(_ORDINAL_STRING_BASE_EN)
230 
231 
232 _LONG_ORDINAL_STRING_EN = {
233  1e6: "millionth",
234  1e12: "billionth",
235  1e18: "trillionth",
236  1e24: "quadrillionth",
237  1e30: "quintillionth",
238  1e36: "sextillionth",
239  1e42: "septillionth",
240  1e48: "octillionth",
241  1e54: "nonillionth",
242  1e60: "decillionth"
243  # TODO > 1e60
244 }
245 _LONG_ORDINAL_STRING_EN.update(_ORDINAL_STRING_BASE_EN)


mycroft_ros
Author(s):
autogenerated on Mon Apr 26 2021 02:35:40