|
@@ -65,20 +65,20 @@ class NumberParser:
|
65
|
65
|
|
66
|
66
|
def __init__(self):
|
67
|
67
|
self.number_words = []
|
68
|
|
- for word in self.zero:
|
|
68
|
+ for word in sorted(self.zero.keys()):
|
69
|
69
|
self.number_words.append(word)
|
70
|
|
- for word in self.ones:
|
|
70
|
+ for word in sorted(self.ones.keys()):
|
71
|
71
|
self.number_words.append(word)
|
72
|
|
- for word in self.special_ones:
|
|
72
|
+ for word in sorted(self.special_ones.keys()):
|
73
|
73
|
self.number_words.append(word)
|
74
|
|
- for word in self.tens:
|
|
74
|
+ for word in sorted(self.tens.keys()):
|
75
|
75
|
self.number_words.append(word)
|
76
|
|
- for word in self.hundred:
|
|
76
|
+ for word in sorted(self.hundred.keys()):
|
77
|
77
|
self.number_words.append(word)
|
78
|
|
- for word in self.exp:
|
|
78
|
+ for word in sorted(self.exp.keys()):
|
79
|
79
|
self.number_words.append(word)
|
80
|
80
|
self.mandatory_number_words = self.number_words.copy()
|
81
|
|
- for word in self.allowed:
|
|
81
|
+ for word in sorted(self.allowed):
|
82
|
82
|
self.number_words.append(word)
|
83
|
83
|
|
84
|
84
|
def parse_number(self, text_line):
|