@@ -94,14 +94,14 @@ def __init__(self, cardinal: GraphFst):
9494
9595 # Graph for year
9696 century_number = pynini .compose (pynini .closure (NEMO_HI_DIGIT , 1 ), cardinal_graph ) + pynini .accep ("वीं" )
97- century_text = pynutil .insert ("text : \" " ) + century_number + pynutil .insert ("\" " ) + insert_space
97+ century_text = pynutil .insert ("era : \" " ) + century_number + pynutil .insert ("\" " ) + insert_space
9898
9999 # Updated logic to use suffix_union
100100 year_number = graph_year + suffix_union
101- year_text = pynutil .insert ("text : \" " ) + year_number + pynutil .insert ("\" " ) + insert_space
101+ year_text = pynutil .insert ("era : \" " ) + year_number + pynutil .insert ("\" " ) + insert_space
102102
103103 # Updated logic to use prefix_union
104- year_prefix = pynutil .insert ("text : \" " ) + prefix_union + insert_space + graph_year + pynutil .insert ("\" " )
104+ year_prefix = pynutil .insert ("era : \" " ) + prefix_union + insert_space + graph_year + pynutil .insert ("\" " )
105105
106106 graph_dd_mm_yyyy = (
107107 days_graph + (delete_dash | delete_slash ) + months_graph + (delete_dash | delete_slash ) + years_graph
@@ -117,10 +117,8 @@ def __init__(self, cardinal: GraphFst):
117117
118118 graph_year_suffix = era_graph
119119
120- comma_graph = pynutil .insert ("text: \" " ) + delete_comma + insert_space + graph_year + pynutil .insert ("\" " )
121-
122120 graph_range = (
123- pynutil .insert ("text : \" " )
121+ pynutil .insert ("era : \" " )
124122 + cardinal_graph
125123 + insert_space
126124 + range_graph
@@ -143,7 +141,6 @@ def __init__(self, cardinal: GraphFst):
143141 | pynutil .add_weight (century_text , - 0.001 )
144142 | pynutil .add_weight (year_text , - 0.001 )
145143 | pynutil .add_weight (year_prefix , - 0.009 )
146- | comma_graph
147144 )
148145
149146 self .final_graph = final_graph .optimize ()
0 commit comments