File tree Expand file tree Collapse file tree
nemo_text_processing/text_normalization/hi
tests/nemo_text_processing/hi/data_text_normalization Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def __init__(self, cardinal: GraphFst):
8585 graph_mm_dd_yyyy += pynutil .insert (" preserve_order: true " )
8686
8787 graph_mm_yyyy = (
88- months_graph + ( delete_dash | pynini . accep ( "" )) + years_graph + pynutil . insert ( " preserve_order: true " )
88+ months_graph + delete_dash + insert_space + years_graph
8989 )
9090
9191 graph_year_suffix = era_graph
@@ -108,7 +108,7 @@ def __init__(self, cardinal: GraphFst):
108108 | graph_mm_dd
109109 | pynutil .add_weight (graph_dd_mm_yyyy , - 0.001 )
110110 | graph_mm_dd_yyyy
111- | graph_mm_yyyy
111+ | pynutil . add_weight ( graph_mm_yyyy , - 0.2 )
112112 | pynutil .add_weight (graph_year_suffix , - 0.001 )
113113 | pynutil .add_weight (graph_range , - 0.005 )
114114 )
Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ def __init__(self):
3939
4040 year = pynutil .delete ("year: \" " ) + pynini .closure (NEMO_NOT_QUOTE , 1 ) + pynutil .delete ("\" " )
4141
42- era = pynutil .delete ("era: \" " ) + pynini .closure (NEMO_NOT_QUOTE , 1 ) + pynutil .delete ("\" " )
42+ graph_era = pynutil .delete ("era: \" " ) + pynini .closure (NEMO_NOT_QUOTE , 1 ) + pynutil .delete ("\" " )
4343
44- range = pynutil .delete ("text: \" " ) + pynini .closure (NEMO_NOT_QUOTE , 1 ) + pynutil .delete ("\" " )
44+ graph_range = pynutil .delete ("text: \" " ) + pynini .closure (NEMO_NOT_QUOTE , 1 ) + pynutil .delete ("\" " )
4545
4646 graph_dd_mm = day + NEMO_SPACE + month
4747
@@ -53,10 +53,6 @@ def __init__(self):
5353
5454 graph_mm_yyyy = month + NEMO_SPACE + year
5555
56- graph_era = era
57-
58- graph_range = range
59-
6056 optional_preserve_order = pynini .closure (
6157 pynutil .delete ("preserve_order:" ) + delete_space + pynutil .delete ("true" ) + delete_space
6258 | pynutil .delete ("field_order:" )
Original file line number Diff line number Diff line change 1414१०-२९-२०००~अक्टूबर उनतीस दो हज़ार
1515११-१४-११००~नवंबर चौदह ग्यारह सौ
1616०३-२०१०~मार्च दो हज़ार दस
17+ ११-२०२४~नवंबर दो हज़ार चौबीस
1718२०७०~दो हज़ार सत्तर
1819२०२४~दो हज़ार चौबीस
1920१२० ई. पू.~एक सौ बीस ईसा पूर्व
You can’t perform that action at this time.
0 commit comments