-
Notifications
You must be signed in to change notification settings - Fork 140
Merge staging Hindi TN v2 to main #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2d80ba5
Future Implementations for classes - Measure, Money, and Date (#258)
ngachchi c498731
update jenkins cache
mgrafu 3b350a1
Merge branch 'main' into staging_hi_tn
mgrafu 2e6d4e8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9588396
Potential fix for code scanning alert no. 821: Unused local variable
mgrafu 714c1cc
Hindi TN Future Implementations 2.0. - Fraction, Measure and Time (#310)
ngachchi 68529fd
Hindi TN 2.0 - Telephone class integration from staging branch (#320)
shreeshd-tn eb7b3e6
Rebase Hindi TN update: Fix Jenkinsfile for CI (#325) (#331)
shreeshd-tn dd0b8b7
Hindi TN: Ordinal Implementation (#343)
shreeshd-tn 96ba6a2
Hindi TN: Main to staging Fix + Cardinals (leading zero update) (#348)
shreeshd-tn 83783a5
Merge branch 'main' into staging_hi_tn
mgrafu 5e89a81
debug file issue
mgrafu 262cd6e
debug ordinals error
mgrafu f364fbb
ci debug
mgrafu 500e1fc
revert to original suffixes for ordinals
mgrafu aa22d29
CI fix: Missing init file (#350)
shreeshd-tn df5b3dc
HI TN: Staging branch cleanup for main merge (#355)
shreeshd-tn 6dc912f
Cache date change (#356)
shreeshd-tn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
nemo_text_processing/text_normalization/hi/data/measure/quarterly_units_list.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| हफ़्ते | ||
| सप्ताह | ||
| सदियां | ||
| सदियों | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,8 @@ h घंटे | |
| min मिनट | ||
| doz दर्जन | ||
| yr साल | ||
| yr वर्ष | ||
| hp हॉर्सपॉवर | ||
| d दिन | ||
| month महीना | ||
| months महीने | ||
| हफ़्ते हफ़्ते | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,7 +134,6 @@ KHz किलोहर्ट्ज़ | |
| N न्यूटन | ||
| dB डेसीबल | ||
| yr साल | ||
| yr वर्ष | ||
| hp हॉर्सपॉवर | ||
| d दिन | ||
| month महीना | ||
|
|
||
13 changes: 13 additions & 0 deletions
13
nemo_text_processing/text_normalization/hi/data/ordinal/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright (c) 2025, 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. |
12 changes: 12 additions & 0 deletions
12
nemo_text_processing/text_normalization/hi/data/ordinal/exceptions.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| १ला पहला | ||
| १ली पहली | ||
| २रा दूसरा | ||
| २री दूसरी | ||
| ३रा तीसरा | ||
| ३री तीसरी | ||
| ४था चौथा | ||
| ४थी चौथी | ||
| ५वां पाँचवां | ||
| ५वीं पाँचवीं | ||
| ६ठा छठा | ||
| ६ठी छठी |
3 changes: 3 additions & 0 deletions
3
nemo_text_processing/text_normalization/hi/data/ordinal/suffixes.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| वां | ||
| वीं | ||
| वें |
2 changes: 2 additions & 0 deletions
2
nemo_text_processing/text_normalization/hi/data/ordinal/suffixes_map.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| वे वें | ||
|
|
13 changes: 13 additions & 0 deletions
13
nemo_text_processing/text_normalization/hi/data/telephone/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright (c) 2025, 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. |
3 changes: 3 additions & 0 deletions
3
nemo_text_processing/text_normalization/hi/data/telephone/credit_context.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| नंबर | ||
| कार्ड | ||
| क्रेडिट |
5 changes: 5 additions & 0 deletions
5
nemo_text_processing/text_normalization/hi/data/telephone/landline_context.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| नंबर | ||
| मोबाइल | ||
| फोन | ||
| लैंडलाइन | ||
| कॉल |
4 changes: 4 additions & 0 deletions
4
nemo_text_processing/text_normalization/hi/data/telephone/mobile_context.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| नंबर | ||
| मोबाइल | ||
| फोन | ||
| कॉल |
10 changes: 10 additions & 0 deletions
10
nemo_text_processing/text_normalization/hi/data/telephone/number.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| 0 शून्य | ||
| 1 एक | ||
| 2 दो | ||
| 3 तीन | ||
| 4 चार | ||
| 5 पाँच | ||
| 6 छह | ||
| 7 सात | ||
| 8 आठ | ||
| 9 नौ |
4 changes: 4 additions & 0 deletions
4
nemo_text_processing/text_normalization/hi/data/telephone/pincode_context.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| नंबर | ||
| पिन | ||
| कोड | ||
| पिनकोड |
100 changes: 100 additions & 0 deletions
100
nemo_text_processing/text_normalization/hi/data/whitelist/paune_mappings.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| ० एक | ||
| १ दो | ||
| २ तीन | ||
| ३ चार | ||
| ४ पाँच | ||
| ५ छह | ||
| ६ सात | ||
| ७ आठ | ||
| ८ नौ | ||
| ९ दस | ||
| १० ग्यारह | ||
| ११ बारह | ||
| १२ तेरह | ||
| १३ चौदह | ||
| १४ पंद्रह | ||
| १५ सोलह | ||
| १६ सत्रह | ||
| १७ अठारह | ||
| १८ उन्नीस | ||
| १९ बीस | ||
| २० इक्कीस | ||
| २१ बाईस | ||
| २२ तेईस | ||
| २३ चौबीस | ||
| २४ पच्चीस | ||
| २५ छब्बीस | ||
| २६ सत्ताईस | ||
| २७ अट्ठाईस | ||
| २८ उनतीस | ||
| २९ तीस | ||
| ३० इकतीस | ||
| ३१ बत्तीस | ||
| ३२ तैंतीस | ||
| ३३ चौंतीस | ||
| ३४ पैंतीस | ||
| ३५ छत्तीस | ||
| ३६ सैंतीस | ||
| ३७ अड़तीस | ||
| ३८ उनतालीस | ||
| ३९ चालीस | ||
| ४० इकतालीस | ||
| ४१ बयालीस | ||
| ४२ तैंतालीस | ||
| ४३ चौवालीस | ||
| ४४ पैंतालीस | ||
| ४५ छियालीस | ||
| ४६ सैंतालीस | ||
| ४७ अड़तालीस | ||
| ४८ उनचास | ||
| ४९ पचास | ||
| ५० इक्यावन | ||
| ५१ बावन | ||
| ५२ तिरेपन | ||
| ५३ चौवन | ||
| ५४ पचपन | ||
| ५५ छप्पन | ||
| ५६ सत्तावन | ||
| ५७ अट्ठावन | ||
| ५८ उनसठ | ||
| ५९ साठ | ||
| ६० इकसठ | ||
| ६१ बासठ | ||
| ६२ तिरेसठ | ||
| ६३ चौंसठ | ||
| ६४ पैंसठ | ||
| ६५ छियासठ | ||
| ६६ सड़सठ | ||
| ६७ अड़सठ | ||
| ६८ उनहत्तर | ||
| ६९ सत्तर | ||
| ७० इकहत्तर | ||
| ७१ बहत्तर | ||
| ७२ तिहत्तर | ||
| ७३ चौहत्तर | ||
| ७४ पचहत्तर | ||
| ७५ छिहत्तर | ||
| ७६ सतहत्तर | ||
| ७७ अठहत्तर | ||
| ७८ उनासी | ||
| ७९ अस्सी | ||
| ८० इक्यासी | ||
| ८१ बयासी | ||
| ८२ तिरासी | ||
| ८३ चौरासी | ||
| ८४ पचासी | ||
| ८५ छियासी | ||
| ८६ सत्तासी | ||
| ८७ अट्ठासी | ||
| ८८ नवासी | ||
| ८९ नब्बे | ||
| ९० इक्यानबे | ||
| ९१ बानबे | ||
| ९२ तिरानबे | ||
| ९३ चौरानबे | ||
| ९४ पंचानबे | ||
| ९५ छियानबे | ||
| ९६ सत्तानबे | ||
| ९७ अट्ठानबे | ||
| ९८ निन्यानबे | ||
| ९९ एक सौ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why deletion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate mappings (
yr→ had two different targets)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can have multiple targets just add a guard for non-determinism
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will keep this in mind. I went through the code and currently its just a simple mapping. The two mappings are also just formal and informal variants, so for now we’re scoping only for a single, deterministic approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a common term? If so it should be added nonetheless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok to leave it for now with one single output, especially since we've already merged. Let's revisit if/when we go for nondet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure the enxt time we'll have dedicated help for Hindi so want to make sure the necessary stuff is added. If it's not common then we can remove, but if it's going to make outputs funky without it there should be an addition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
साल (informal) is much more frequent (85%) and वर्ष (formal) is generally used in scientific/religious texts. In speech the formal one is even more rare.
Coming back to our use case, there are 10/455 blind tests that have (yr) and they are in this format:
<number> yrThe only way that I can think of to differentiate is to make it formal if the number is large or a decimal. If that sounds good, I'll add this change in one of my future PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a good call. @mgrafu do you concur?