Skip to content

Commit 9b3a21d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 397fcc8 commit 9b3a21d

File tree

1 file changed

+8
-6
lines changed
  • nemo_text_processing/text_normalization/hi/taggers

1 file changed

+8
-6
lines changed

nemo_text_processing/text_normalization/hi/taggers/date.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ def __init__(self, cardinal: GraphFst):
5656
)
5757

5858
cardinal_graph = (
59-
digit
60-
| teens_and_ties
61-
| cardinal.graph_hundreds
62-
| graph_year_thousands
63-
| graph_year_hundreds_as_thousands
59+
digit | teens_and_ties | cardinal.graph_hundreds | graph_year_thousands | graph_year_hundreds_as_thousands
6460
)
6561

6662
graph_year = graph_year_thousands | graph_year_hundreds_as_thousands
@@ -97,7 +93,13 @@ def __init__(self, cardinal: GraphFst):
9793
months_graph + (delete_dash | delete_slash) + days_graph + (delete_dash | delete_slash) + years_graph
9894
)
9995

100-
graph_yyyy = pynutil.insert("text: \"") + pynini.compose(pynini.closure(NEMO_HI_DIGIT, 1), cardinal_graph) + pynutil.insert("\"") + insert_space + pynutil.insert(" preserve_order: true ")
96+
graph_yyyy = (
97+
pynutil.insert("text: \"")
98+
+ pynini.compose(pynini.closure(NEMO_HI_DIGIT, 1), cardinal_graph)
99+
+ pynutil.insert("\"")
100+
+ insert_space
101+
+ pynutil.insert(" preserve_order: true ")
102+
)
101103

102104
graph_mm_dd_yyyy += pynutil.insert(" preserve_order: true ")
103105

0 commit comments

Comments
 (0)