Skip to content

kn ITN: add cardinal semiotic class#455

Open
arya24-mr wants to merge 1 commit into
NVIDIA:staging/kannada_itn_v1from
arya24-mr:feat-kn-itn-cardinal
Open

kn ITN: add cardinal semiotic class#455
arya24-mr wants to merge 1 commit into
NVIDIA:staging/kannada_itn_v1from
arya24-mr:feat-kn-itn-cardinal

Conversation

@arya24-mr

@arya24-mr arya24-mr commented Jul 8, 2026

Copy link
Copy Markdown

What does this PR do ?

This is a PR for Kannada language ITN for cardinal semiontic class

Before your PR is "Ready for review"

Pre checks:

  • Have you signed your commits? Use git commit -s to sign.
  • Do all unittests finish successfully before sending PR?
    1. pytest or (if your machine does not have GPU) pytest --cpu from the root folder (given you marked your test cases accordingly @pytest.mark.run_only_on('CPU')).
    2. Sparrowhawk tests bash tools/text_processing_deployment/export_grammars.sh --MODE=test ...
  • If you are adding a new feature: Have you added test cases for both pytest and Sparrowhawk here.
  • Have you added __init__.py for every folder and subfolder, including data folder which has .TSV files?
  • Have you followed codeQL results and removed unused variables and imports (report is at the bottom of the PR in github review box) ?
  • Have you added the correct license header Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. to all newly added Python files?
  • If you copied nemo_text_processing/text_normalization/en/graph_utils.py your header's second line should be Copyright 2015 and onwards Google, Inc.. See an example here.
  • Remove import guards (try import: ... except: ...) if not already done.
  • If you added a new language or a new feature please update the NeMo documentation (lives in different repo).
  • Have you added your language support to tools/text_processing_deployment/pynini_export.py.

PR Type:

  • New Feature
  • Bugfix
  • Documentation
  • Test

If you haven't finished some of the above items you can still open "Draft" PR.

Signed-off-by: arya24-mr <aryam@nvidia.com>
@arya24-mr
arya24-mr marked this pull request as ready for review July 8, 2026 05:21
@mgrafu
mgrafu requested a review from folivoramanh July 10, 2026 19:40

@folivoramanh folivoramanh left a comment

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.

  • add init into data/numbers
  • remove nemo_text_processing 2
  • add sparrowhawk file and run sh test (we need to make sure both pytest and sparrowhawk pass)
  • add kn to jenkins file

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 this 1 - 99? why we need to list manually like this

೯೬ ತೊಂಬತ್ತಾರು
೯೭ ತೊಂಬತ್ತೇಳು
೯೮ ತೊಂಬತ್ತೆಂಟು
೯೯ ತೊಂಬತ್ತೊಂಬತ್ತು No newline at end of file

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, why we need manual listing 90 rows?

@@ -0,0 +1,13 @@
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.

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.

please update to 2026

@@ -0,0 +1,13 @@
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.

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.

2026

@@ -0,0 +1,181 @@
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
# Copyright 2024 and onwards Google, Inc.

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.

2026 and delete line 2, you can check Spanish or Portuguese to copy

ಇಪ್ಪತ್ತಮೂರು ಲಕ್ಷ ನಲವತ್ತೈದು ಸಾವಿರ ಐದು ನೂರು ಅರವತ್ತೇಳು~೨೩೪೫೫೬೭
ಒಂದು ಕೋಟಿ ಇಪ್ಪತ್ತಮೂರು ಲಕ್ಷ ನಲವತ್ತೈದು ಸಾವಿರ ಐದು ನೂರು ಅರವತ್ತೇಳು~೧೨೩೪೫೫೬೭
ಒಂದು ಕೋಟಿ ಇಪ್ಪತ್ತೊಂದು ಲಕ್ಷ ಇಪ್ಪತ್ತೊಂದು ಸಾವಿರ ಎರಡು ನೂರು ಹನ್ನೆರಡು~೧೨೧೨೧೨೧೨
ಏಳೂವರೆ ನೂರು~೭೫೦

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.

please test both en number and kn number, and make the test case varied
eg: 123456789

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.

do not add blind test set here, we only publish unit test

# graph_exception = pynini.union(*labels_exception).optimize()

self.graph_no_exception = graph
self.graph = graph # (pynini.project(graph, "input") - graph_exception.arcsort()) @ graph

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.

2 graph with same function?

)

# Specialized component rules for distinct fraction terms
graph_fraction_idioms = pynini.union(

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.

avoid hardcoding on .py file, let's add it to tsv and call when use it



class CardinalFst(GraphFst):

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.

add docstring

from nemo_text_processing.text_normalization.pt.verbalizers.verbalize_final import VerbalizeFinalFst
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

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.

please double check with main branch

@arya24-mr

arya24-mr commented Jul 20, 2026

Copy link
Copy Markdown
Author

I will review and update all the changes.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants