Skip to content

Commit 41c0e23

Browse files
committed
fix: add missing space between digit groups in comma-separated numbers (#291)
Numbers like 0,013,225 were normalized to "oh zero one threetwo two five" with "three" and "two" concatenated. The comma-separated digit groups in single_digits_graph_with_commas lacked a space separator between groups.
1 parent 083fe4c commit 41c0e23

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tn/english/rules/cardinal.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ def build_tagger(self):
7272
+ single_digits_graph
7373
+ self.INSERT_SPACE
7474
+ single_digits_graph
75-
).plus
75+
+ (self.INSERT_SPACE + pynutil.delete(",")
76+
+ single_digits_graph
77+
+ self.INSERT_SPACE
78+
+ single_digits_graph
79+
+ self.INSERT_SPACE
80+
+ single_digits_graph).star
81+
)
7682
)
7783

7884
graph = (

0 commit comments

Comments
 (0)