Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
856a301
feat(ta): add cardinal TN tagger, verbalizer and test cases
surendran-246 Jun 4, 2026
7ebabdf
feat(ta): address review comments
surendran-246 Jun 5, 2026
d68701b
message
surendran-246 Jun 16, 2026
c2fc100
Updated Ta Cardinal
surendran-246 Jun 17, 2026
f9d575d
cardinal implementation
surendran-246 Jul 7, 2026
fcfcb3e
cardinal file
surendran-246 Jul 7, 2026
423f239
Updated cardinal file
surendran-246 Jul 7, 2026
5a39ceb
Updated cardinal
surendran-246 Jul 7, 2026
a0815e9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 7, 2026
eaf2223
Cardinal updated file
surendran-246 Jul 7, 2026
c0e51f1
Updated cardinal
surendran-246 Jul 7, 2026
a0cd909
Updated Cardinal
surendran-246 Jul 8, 2026
4761e67
Added Cardinal
surendran-246 Jul 8, 2026
301db6f
Ta cardinal
surendran-246 Jul 8, 2026
60b9d58
Added Cardinal file
surendran-246 Jul 8, 2026
fe805eb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 8, 2026
e2e7996
Updated Cardinal file
surendran-246 Jul 8, 2026
2907744
Updated TA Cardinal
surendran-246 Jul 23, 2026
0531bc2
Merge branch 'staging/tamil_tn_v1' into feat-ta-cardinal
surendran-246 Jul 23, 2026
026875c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 23, 2026
5561410
Modified Cardinal
surendran-246 Jul 24, 2026
9bbb059
Update Cardinal class
surendran-246 Aug 10, 2026
3982a3d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 10, 2026
bf50955
Updated Cardinal class based on PR reviews
surendran-246 Aug 18, 2026
b4c1aeb
Updated Cardinal class based on PR reviews
surendran-246 Aug 18, 2026
e63ae9c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 18, 2026
388ae35
Added docstring for taggers/ word file
surendran-246 Aug 19, 2026
0f657e6
Added docstring file in taggers
surendran-246 Aug 19, 2026
316e82e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 19, 2026
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
25 changes: 25 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pipeline {
JA_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/10-17-24-1'
HI_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-04-26-5'
KO_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-04-25-6'
TA_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/07-21-26-0'
DEFAULT_TN_CACHE='/home/jenkins/TestData/text_norm/ci/grammars/06-08-23-0'
}
stages {
Expand Down Expand Up @@ -113,6 +114,25 @@ pipeline {
}
}

stage('L0: Create TA TN Grammars') {
when {
anyOf {
branch 'main'
branch 'staging/**'
branch 'staging_*'
changeRequest target: 'main'
}
}
failFast true
parallel {
stage('L0: Ta TN grammars') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" python nemo_text_processing/text_normalization/normalize.py --lang=ta --text="௧" --cache_dir ${TA_TN_CACHE}'
}
}

}
}
stage('L0: Create DE/ES TN/ITN Grammars') {
when {
anyOf {
Expand Down Expand Up @@ -408,6 +428,11 @@ pipeline {
sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/hi/ -m "not pleasefixme" --cpu --tn_cache_dir ${HI_TN_CACHE}'
}
}
stage('L1: Run all TA TN tests (restore grammars from cache)') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/ta/ -m "not pleasefixme" --cpu --tn_cache_dir ${TA_TN_CACHE}'
}
}
stage('L1: Run all Codeswitched ES/EN TN/ITN tests (restore grammars from cache)') {
steps {
sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/es_en/ -m "not pleasefixme" --cpu --tn_cache_dir ${ES_EN_TN_CACHE}'
Expand Down
7 changes: 6 additions & 1 deletion 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,10 @@ 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.verbalize_final import VerbalizeFinalFst

else:
raise NotImplementedError(f"Language {lang} has not been supported yet.")

Expand Down Expand Up @@ -737,7 +742,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
2 changes: 1 addition & 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
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
கோடி
கோடியே
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,36 @@
100 நூறு
200 இருநூறு
300 முந்நூறு
400 நானூறு
500 ஐந்நூறு
600 அறுநூறு
700 எழுநூறு
800 எட்டுநூறு
900 ஒன்பதுநூறு
௧௦௦ நூறு
௨௦௦ இருநூறு
௩௦௦ முந்நூறு
௪௦௦ நானூறு
௫௦௦ ஐந்நூறு
௬௦௦ அறுநூறு
௭௦௦ எழுநூறு
௮௦௦ எட்டுநூறு
௯௦௦ ஒன்பதுநூறு
1 நூற்று
2 இருநூற்று
3 முந்நூற்று
4 நானூற்று
5 ஐநூற்று
6 அறுநூற்று
7 எழுநூற்று
8 எட்டுநூற்று
9 ஒன்பதுநூற்று
௧ நூற்று
௨ இருநூற்று
௩ முந்நூற்று
௪ நானூற்று
௫ ஐநூற்று
௬ அறுநூற்று
௭ எழுநூற்று
௮ எட்டுநூற்று
௯ ஒன்பதுநூற்று

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any solution that not listing 10 - 99? (eg 20 - 29 share same rule ಮೂ + digit?)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Tamil, combining tens + digit isn't simple concatenation — the words fuse at the joint (sandhi). E.g. "20"+"1" isn't "இருபதுஒன்று", it's இருபத்தொன்று; "20"+"2" fuses to இருபத்திரண்டு. This fusion is specific to digits 1 and 2 and can't be generalized safely, so we keep 10–99 fully listed rather than generating them at runtime.

Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
௧௦ பத்து
௧௧ பதினொன்று
௧௨ பன்னிரண்டு
௧௩ பதிமூன்று
௧௪ பதினான்கு
௧௫ பதினைந்து
௧௬ பதினாறு
௧௭ பதினேழு
௧௮ பதினெட்டு
௧௯ பத்தொன்பது
௨௦ இருபது
௨௧ இருபத்தொன்று
௨௨ இருபத்திரண்டு
௨௩ இருபத்திமூன்று
௨௪ இருபத்திநான்கு
௨௫ இருபத்திஐந்து
௨௬ இருபத்திஆறு
௨௭ இருபத்திஏழு
௨௮ இருபத்திஎட்டு
௨௯ இருபத்திஒன்பது
௩௦ முப்பது
௩௧ முப்பத்தொன்று
௩௨ முப்பத்திரண்டு
௩௩ முப்பத்திமூன்று
௩௪ முப்பத்திநான்கு
௩௫ முப்பத்திஐந்து
௩௬ முப்பத்திஆறு
௩௭ முப்பத்திஏழு
௩௮ முப்பத்திஎட்டு
௩௯ முப்பத்திஒன்பது
௪௦ நாற்பது
௪௧ நாற்பத்தொன்று
௪௨ நாற்பத்திரண்டு
௪௩ நாற்பத்திமூன்று
௪௪ நாற்பத்திநான்கு
௪௫ நாற்பத்திஐந்து
௪௬ நாற்பத்திஆறு
௪௭ நாற்பத்திஏழு
௪௮ நாற்பத்திஎட்டு
௪௯ நாற்பத்திஒன்பது
௫௦ ஐம்பது
௫௧ ஐம்பத்தொன்று
௫௨ ஐம்பத்திரண்டு
௫௩ ஐம்பத்திமூன்று
௫௪ ஐம்பத்திநான்கு
௫௫ ஐம்பத்திஐந்து
௫௬ ஐம்பத்திஆறு
௫௭ ஐம்பத்திஏழு
௫௮ ஐம்பத்திஎட்டு
௫௯ ஐம்பத்திஒன்பது
௬௦ அறுபது
௬௧ அறுபத்தொன்று
௬௨ அறுபத்திரண்டு
௬௩ அறுபத்திமூன்று
௬௪ அறுபத்திநான்கு
௬௫ அறுபத்திஐந்து
௬௬ அறுபத்திஆறு
௬௭ அறுபத்திஏழு
௬௮ அறுபத்திஎட்டு
௬௯ அறுபத்திஒன்பது
௭௦ எழுபது
௭௧ எழுபத்தொன்று
௭௨ எழுபத்திரண்டு
௭௩ எழுபத்திமூன்று
௭௪ எழுபத்திநான்கு
௭௫ எழுபத்திஐந்து
௭௬ எழுபத்திஆறு
௭௭ எழுபத்திஏழு
௭௮ எழுபத்திஎட்டு
௭௯ எழுபத்திஒன்பது
௮௦ எண்பது
௮௧ எண்பத்தொன்று
௮௨ எண்பத்திரண்டு
௮௩ எண்பத்திமூன்று
௮௪ எண்பத்திநான்கு
௮௫ எண்பத்திஐந்து
௮௬ எண்பத்திஆறு
௮௭ எண்பத்திஏழு
௮௮ எண்பத்திஎட்டு
௮௯ எண்பத்திஒன்பது
௯௦ தொண்ணூறு
௯௧ தொண்ணூற்றொன்று
௯௨ தொண்ணூற்றிரண்டு
௯௩ தொண்ணூற்றிமூன்று
௯௪ தொண்ணூற்றிநான்கு
௯௫ தொண்ணூற்றிஐந்து
௯௬ தொண்ணூற்றிஆறு
௯௭ தொண்ணூற்றிஏழு
௯௮ தொண்ணூற்றிஎட்டு
௯௯ தொண்ணூற்றிஒன்பது

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question: is there any solution that not listing 10 - 99? (eg 20 - 29 share same rule ಮೂ + digit?)

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,18 @@
1 ஆயிர
2 இரண்டாயிர
3 மூவாயிர
4 நான்காயிர
5 ஐந்தாயிர
6 ஆறாயிர
7 ஏழாயிர
8 எட்டாயிர
9 ஒன்பதாயிர
௧ ஆயிர
௨ இரண்டாயிர
௩ மூவாயிர
௪ நான்காயிர
௫ ஐந்தாயிர
௬ ஆறாயிர
௭ ஏழாயிர
௮ எட்டாயிர
௯ ஒன்பதாயிர
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
௦ சுழியம்
0 சுழியம்
Loading