Tamil TN Cardinal Semiotic Class - #449
Conversation
b06d8e8 to
6b431c2
Compare
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
for more information, see https://pre-commit.ci Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
231dd35 to
eaf2223
Compare
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: surendran-246 <surendrans@nvidia.com>
|
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
Signed-off-by: surendran-246 <surendrans@nvidia.com>
0e62120 to
2907744
Compare
Signed-off-by: surendran-246 <surendrans@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: surendran-246 <surendrans@nvidia.com>
|
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
| @@ -0,0 +1,53 @@ | |||
| 4 நான்குகள்~நான்கு நான்குகள் | |||
There was a problem hiding this comment.
does this cover all rule categories included? at the very least I see negative numbers missing
There was a problem hiding this comment.
Yes, it covers all rules, and I’ve added negative numbers and comma-grouped numerals to the test cases
There was a problem hiding this comment.
let's review add these test cases as needed:
10000~பத்து ஆயிரம்
20000~இருபது ஆயிரம்
45000~நாற்பத்திஐந்து ஆயிரம்
99000~தொண்ணூற்றிஒன்பது ஆயிரம்
100000000000~பத்து ஆயிரம் கோடி
800~எண்ணூறு
850~எண்ணூற்று ஐம்பது
900~தொள்ளாயிரம்
905~தொள்ளாயிரத்து ஐந்து
987~தொள்ளாயிரத்து எண்பத்தேழு
25~இருபத்தைந்து
28~இருபத்தெட்டு
36~முப்பத்தாறு
47~நாற்பத்தேழு
59~ஐம்பத்தொன்பது
65~அறுபத்தைந்து
78~எழுபத்தெட்டு
89~எண்பத்தொன்பது
99~தொண்ணூற்றொன்பது
1000~ஆயிரம்
2000~இரண்டாயிரம்
3000~மூவாயிரம்
5000~ஐந்தாயிரம்
9000~ஒன்பதாயிரம்
100000~ஒரு லட்சம்
200000~இரண்டு லட்சம்
1000000~பத்து லட்சம்
10,00,000~பத்து லட்சம்
1,000,000~பத்து லட்சம்
10000000~ஒரு கோடி
1,00,00,000~ஒரு கோடி
20000000~இரண்டு கோடி
100000000~பத்து கோடி
1000000000~நூறு கோடி
1,000,000,000~நூறு கோடி
10000000000~ஆயிரம் கோடி
1000000000000~ஒரு லட்சம் கோடி
5000000000000~ஐந்து லட்சம் கோடி
10000000000000~பத்து லட்சம் கோடி
1,001,000,000,000~ஒரு லட்சத்து நூறு கோடி
12,342,300,000~ஆயிரத்து இருநூற்று முப்பத்திநான்கு கோடியே இருபத்திமூன்று லட்சம்
10000001~ஒரு கோடியே ஒன்று
10000100~ஒரு கோடியே நூறு
10001000~ஒரு கோடியே ஆயிரம்
10100000~ஒரு கோடியே ஒரு லட்சம்
12000000~ஒரு கோடியே இருபது லட்சம்
10000000001~ஆயிரம் கோடியே ஒன்று
500~ஐநூறு
600~அறுநூறு
700~எழுநூறு
19~பத்தொன்பது
91~தொண்ணூற்றொன்று
92~தொண்ணூற்றிரண்டு
0~சுழியம்
00~சுழியம் சுழியம்
-100001~கழித்தல் ஒரு லட்சத்து ஒன்று
-1,00,00,000~கழித்தல் ஒரு கோடி
-10000000~கழித்தல் ஒரு கோடி
99999~தொண்ணூற்றிஒன்பது ஆயிரத்து ஒன்பதுநூற்று தொண்ணூற்றிஒன்பது
1,234,567~பன்னிரண்டு லட்சத்து முப்பத்திநான்கு ஆயிரத்து ஐநூற்று அறுபத்திஏழு
123,456,789~பன்னிரண்டு கோடியே முப்பத்திநான்கு லட்சத்து ஐம்பத்திஆறு ஆயிரத்து எழுநூற்று எண்பத்திஒன்பது
1,23,45,00,00,000~பன்னிரண்டு ஆயிரத்து முந்நூற்று நாற்பத்திஐந்து கோடி
99999999999999~தொண்ணூற்றிஒன்பது லட்சத்து தொண்ணூற்றிஒன்பது ஆயிரத்து ஒன்பதுநூற்று தொண்ணூற்றிஒன்பது கோடியே தொண்ணூற்றிஒன்பது லட்சத்து தொண்ணூற்றிஒன்பது ஆயிரத்து ஒன்பதுநூற்று தொண்ணூற்றிஒன்பது
10000000000000000~10000000000000000 (above ceiling: passthrough — correct today)
1,0000~? currently: ஒன்று , சுழியம் சுழியம் சுழியம் சுழியம்
12,34~? currently: பன்னிரண்டு , முப்பத்திநான்கு
1,23,4567~? currently: ஒன்று , இருபத்திமூன்று , நான்காயிரத்து ஐநூற்று அறுபத்திஏழு
1௨3~? currently: நூற்று இருபத்திமூன்று
1,௨௩,456~? currently: ஒரு லட்சத்து இருபத்திமூன்று ஆயிரத்து நானூற்று ஐம்பத்திஆறு
-0~? currently: கழித்தல் சுழியம்
|
please make sure that all new directories have init files |
Signed-off-by: surendran-246 <surendrans@nvidia.com>
for more information, see https://pre-commit.ci
|
Thanks for the review, @mgrafu. Addressed all the feedback comments. Testing: Cardinal pytest passed; Sparrowhawk TNCardinal passed. |
Signed-off-by: surendran-246 <surendrans@nvidia.com>
Signed-off-by: surendran-246 <surendrans@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: surendran-246 <surendrans@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: surendran-246 <surendrans@nvidia.com>
| class CardinalFst(GraphFst): | ||
| """ | ||
| Finite state transducer for classifying cardinals | ||
| e.g. 23 -> cardinal { integer: "இருபத்திமூன்று" } |
There was a problem hiding this comment.
let's specify up to what magnitude normalization is covered
| class CardinalFst(GraphFst): | ||
| """ | ||
| Finite state transducer for verbalizing cardinal, e.g. | ||
| cardinal { negative: "true" integer: "-23" } -> கழித்தல் இருபத்தேழு |
There was a problem hiding this comment.
doesn't the tagger verbalize the number already?
| @@ -408,6 +414,11 @@ pipeline { | |||
| sh 'CUDA_VISIBLE_DEVICES="" pytest tests/nemo_text_processing/hi/ -m "not pleasefixme" --cpu --tn_cache_dir ${HI_TN_CACHE}' | |||
| } | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | |||
| # | |||
There was a problem hiding this comment.
we should also have tests for word and punctuation
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Before your PR is "Ready for review"
Pre checks:
git commit -sto sign.pytestor (if your machine does not have GPU)pytest --cpufrom the root folder (given you marked your test cases accordingly@pytest.mark.run_only_on('CPU')).bash tools/text_processing_deployment/export_grammars.sh --MODE=test ...pytestand Sparrowhawk here.__init__.pyfor every folder and subfolder, includingdatafolder which has .TSV files?Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.to all newly added Python files?Copyright 2015 and onwards Google, Inc.. See an example here.try import: ... except: ...) if not already done.PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.