Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions nemo_text_processing/text_normalization/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def __init__(

if post_process:
self.post_processor = PostProcessingFst(cache_dir=cache_dir, overwrite_cache=overwrite_cache)

elif lang == 'it':
from nemo_text_processing.text_normalization.it.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.it.verbalizers.verbalize_final import VerbalizeFinalFst
Expand All @@ -191,6 +192,13 @@ def __init__(
elif lang == 'ko':
from nemo_text_processing.text_normalization.ko.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.ko.verbalizers.verbalize_final import VerbalizeFinalFst
elif lang == 'ta':
from nemo_text_processing.text_normalization.ta.taggers.tokenize_and_classify import ClassifyFst
from nemo_text_processing.text_normalization.ta.verbalizers.post_processing import PostProcessingFst
from nemo_text_processing.text_normalization.ta.verbalizers.verbalize_final import VerbalizeFinalFst

if post_process:
self.post_processor = PostProcessingFst(cache_dir=cache_dir, overwrite_cache=overwrite_cache)
else:
raise NotImplementedError(f"Language {lang} has not been supported yet.")

Expand Down Expand Up @@ -391,7 +399,11 @@ def normalize(
return text
output = SPACE_DUP.sub(' ', output[1:])

if self.lang in ["en", "hi", "vi"] and hasattr(self, 'post_processor') and self.post_processor is not None:
if (
self.lang in ["en", "hi", "ta", "vi"]
and hasattr(self, 'post_processor')
and self.post_processor is not None
):
output = self.post_process(output)

if punct_post_process:
Expand Down Expand Up @@ -737,7 +749,7 @@ def parse_args():
parser.add_argument(
"--language",
help="language",
choices=["en", "de", "es", "fr", "hu", "sv", "zh", "ar", "it", "hy", "ja", "hi", "ko", "vi", "pt"],
choices=["en", "de", "es", "fr", "hu", "sv", "zh", "ar", "it", "hy", "ja", "hi", "ta", "ko", "vi", "pt"],
default="en",
type=str,
)
Expand Down
6 changes: 5 additions & 1 deletion nemo_text_processing/text_normalization/run_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def parse_args():
parser.add_argument(
"--lang",
help="language",
choices=['ar', 'de', 'en', 'es', 'fr', 'hu', 'it', 'ru', 'sv', 'zh', 'hy', 'hi', 'ko', 'vi', 'pt'],
choices=['ar', 'de', 'en', 'es', 'fr', 'hu', 'it', 'ru', 'sv', 'zh', 'hy', 'hi', 'ta', 'ko', 'vi', 'pt'],
default="en",
type=str,
)
Expand Down Expand Up @@ -67,6 +67,10 @@ def parse_args():
to_lower = args.input_case == "lower_cased"
training_data = load_files([file_path], to_lower=to_lower)

# print("Loading training data: " + file_path)
# to_lower = True if args.input_case == "lower_cased" else False
# training_data = load_files([file_path], to_lower=to_lower)

if args.filter:
training_data = filter_loaded_data(training_data)

Expand Down
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/ta/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions nemo_text_processing/text_normalization/ta/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
18 changes: 18 additions & 0 deletions nemo_text_processing/text_normalization/ta/data/numbers/digit.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
௧ ஒன்று
௨ இரண்டு
௩ மூன்று
௪ நான்கு
௫ ஐந்து
௬ ஆறு
௭ ஏழு
௮ எட்டு
௯ ஒன்பது
1 ஒன்று
2 இரண்டு
3 மூன்று
4 நான்கு
5 ஐந்து
6 ஆறு
7 ஏழு
8 எட்டு
9 ஒன்பது
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
100 நூறு
200 இருநூற்று
300 முந்நூற்று
400 நானூற்று
500 ஐந்நூற்று
600 அறுநூற்று
700 எழுநூற்று
800 எட்டுநூற்று
900 ஒன்பதுநூற்று
௧௦௦ நூறு
௨௦௦ இருநூற்று
௩௦௦ முந்நூற்று
௪௦௦ நானூற்று
௫௦௦ ஐந்நூற்று
௬௦௦ அறுநூற்று
௭௦௦ எழுநூற்று
௮௦௦ எட்டுநூற்று
௯௦௦ ஒன்பதுநூற்று
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
௧௦ பத்து
௧௧ பதினொன்று
௧௨ பன்னிரண்டு
௧௩ பதிமூன்று
௧௪ பதினான்கு
௧௫ பதினைந்து
௧௬ பதினாறு
௧௭ பதினேழு
௧௮ பதினெட்டு
௧௯ பத்தொன்பது
௨௦ இருபது
௨௧ இருபத்தொன்று
௨௨ இருபத்திரண்டு
௨௩ இருபத்திமூன்று
௨௪ இருபத்திநான்கு
௨௫ இருபத்திஐந்து
௨௬ இருபத்திஆறு
௨௭ இருபத்திஏழு
௨௮ இருபத்திஎட்டு
௨௯ இருபத்திஒன்பது
௩௦ முப்பது
௩௧ முப்பத்தொன்று
௩௨ முப்பத்திரண்டு
௩௩ முப்பத்திமூன்று
௩௪ முப்பத்திநான்கு
௩௫ முப்பத்திஐந்து
௩௬ முப்பத்திஆறு
௩௭ முப்பத்திஏழு
௩௮ முப்பத்திஎட்டு
௩௯ முப்பத்திஒன்பது
௪௦ நாற்பது
௪௧ நாற்பத்தொன்று
௪௨ நாற்பத்திரண்டு
௪௩ நாற்பத்திமூன்று
௪௪ நாற்பத்திநான்கு
௪௫ நாற்பத்திஐந்து
௪௬ நாற்பத்திஆறு
௪௭ நாற்பத்திஏழு
௪௮ நாற்பத்திஎட்டு
௪௯ நாற்பத்திஒன்பது
௫௦ ஐம்பது
௫௧ ஐம்பத்தொன்று
௫௨ ஐம்பத்திரண்டு
௫௩ ஐம்பத்திமூன்று
௫௪ ஐம்பத்திநான்கு
௫௫ ஐம்பத்திஐந்து
௫௬ ஐம்பத்திஆறு
௫௭ ஐம்பத்திஏழு
௫௮ ஐம்பத்திஎட்டு
௫௯ ஐம்பத்திஒன்பது
௬௦ அறுபது
௬௧ அறுபத்தொன்று
௬௨ அறுபத்திரண்டு
௬௩ அறுபத்திமூன்று
௬௪ அறுபத்திநான்கு
௬௫ அறுபத்திஐந்து
௬௬ அறுபத்திஆறு
௬௭ அறுபத்திஏழு
௬௮ அறுபத்திஎட்டு
௬௯ அறுபத்திஒன்பது
௭௦ எழுபது
௭௧ எழுபத்தொன்று
௭௨ எழுபத்திரண்டு
௭௩ எழுபத்திமூன்று
௭௪ எழுபத்திநான்கு
௭௫ எழுபத்திஐந்து
௭௬ எழுபத்திஆறு
௭௭ எழுபத்திஏழு
௭௮ எழுபத்திஎட்டு
௭௯ எழுபத்திஒன்பது
௮௦ எண்பது
௮௧ எண்பத்தொன்று
௮௨ எண்பத்திரண்டு
௮௩ எண்பத்திமூன்று
௮௪ எண்பத்திநான்கு
௮௫ எண்பத்திஐந்து
௮௬ எண்பத்திஆறு
௮௭ எண்பத்திஏழு
௮௮ எண்பத்திஎட்டு
௮௯ எண்பத்திஒன்பது
௯௦ தொண்ணூறு
௯௧ தொண்ணூற்றொன்று
௯௨ தொண்ணூற்றிரண்டு
௯௩ தொண்ணூற்றிமூன்று
௯௪ தொண்ணூற்றிநான்கு
௯௫ தொண்ணூற்றிஐந்து
௯௬ தொண்ணூற்றிஆறு
௯௭ தொண்ணூற்றிஏழு
௯௮ தொண்ணூற்றிஎட்டு
௯௯ தொண்ணூற்றிஒன்பது
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
10 பத்து
11 பதினொன்று
12 பன்னிரண்டு
13 பதிமூன்று
14 பதினான்கு
15 பதினைந்து
16 பதினாறு
17 பதினேழு
18 பதினெட்டு
19 பத்தொன்பது
20 இருபது
21 இருபத்தொன்று
22 இருபத்திரண்டு
23 இருபத்திமூன்று
24 இருபத்திநான்கு
25 இருபத்திஐந்து
26 இருபத்திஆறு
27 இருபத்திஏழு
28 இருபத்திஎட்டு
29 இருபத்திஒன்பது
30 முப்பது
31 முப்பத்தொன்று
32 முப்பத்திரண்டு
33 முப்பத்திமூன்று
34 முப்பத்திநான்கு
35 முப்பத்திஐந்து
36 முப்பத்திஆறு
37 முப்பத்திஏழு
38 முப்பத்திஎட்டு
39 முப்பத்திஒன்பது
40 நாற்பது
41 நாற்பத்தொன்று
42 நாற்பத்திரண்டு
43 நாற்பத்திமூன்று
44 நாற்பத்திநான்கு
45 நாற்பத்திஐந்து
46 நாற்பத்திஆறு
47 நாற்பத்திஏழு
48 நாற்பத்திஎட்டு
49 நாற்பத்திஒன்பது
50 ஐம்பது
51 ஐம்பத்தொன்று
52 ஐம்பத்திரண்டு
53 ஐம்பத்திமூன்று
54 ஐம்பத்திநான்கு
55 ஐம்பத்திஐந்து
56 ஐம்பத்திஆறு
57 ஐம்பத்திஏழு
58 ஐம்பத்திஎட்டு
59 ஐம்பத்திஒன்பது
60 அறுபது
61 அறுபத்தொன்று
62 அறுபத்திரண்டு
63 அறுபத்திமூன்று
64 அறுபத்திநான்கு
65 அறுபத்திஐந்து
66 அறுபத்திஆறு
67 அறுபத்திஏழு
68 அறுபத்திஎட்டு
69 அறுபத்திஒன்பது
70 எழுபது
71 எழுபத்தொன்று
72 எழுபத்திரண்டு
73 எழுபத்திமூன்று
74 எழுபத்திநான்கு
75 எழுபத்திஐந்து
76 எழுபத்திஆறு
77 எழுபத்திஏழு
78 எழுபத்திஎட்டு
79 எழுபத்திஒன்பது
80 எண்பது
81 எண்பத்தொன்று
82 எண்பத்திரண்டு
83 எண்பத்திமூன்று
84 எண்பத்திநான்கு
85 எண்பத்திஐந்து
86 எண்பத்திஆறு
87 எண்பத்திஏழு
88 எண்பத்திஎட்டு
89 எண்பத்திஒன்பது
90 தொண்ணூறு
91 தொண்ணூற்றொன்று
92 தொண்ணூற்றிரண்டு
93 தொண்ணூற்றிமூன்று
94 தொண்ணூற்றிநான்கு
95 தொண்ணூற்றிஐந்து
96 தொண்ணூற்றிஆறு
97 தொண்ணூற்றிஏழு
98 தொண்ணூற்றிஎட்டு
99 தொண்ணூற்றிஒன்பது
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
௧௦௦௦ ஆயிரம்
௧௦௦௦௦௦ லட்சம்
௧௦௦௦௦௦௦௦ கோடி
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
௦ சுழியம்
0 சுழியம்
Loading