Add Tamil (ta) text normalization and inverse text normalization support - #495
Open
veera-puthiran-14082 wants to merge 1 commit into
Open
veera-puthiran-14082 wants to merge 1 commit into
veera-puthiran-14082 wants to merge 1 commit into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do ?
Add Tamil (
ta) text normalization and inverse text normalization support.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.
Summary
This PR adds
--lang=tasupport to bothnormalize.pyandinverse_normalize.py, covering cardinal,ordinal, decimal, fraction, date, time, money, measure, telephone, whitelist, punctuation and word for
both directions, plus electronic, roman, serial and range for TN only (Tamil has no ITN reading for those
four). ITN inverts the TN cardinal grammar directly rather than duplicating the number morphology, so the
two directions cannot drift apart; this mirrors the existing precedent of
hiITN importing TN utilities,extended here to a full tagger.
15 pytest modules were added under
tests/nemo_text_processing/ta/(523 TN + 289 ITN golden cases, allpassing), along with both Sparrowhawk shell scripts. The existing
hisuite (1111 cases) still passesunchanged.
Notes for reviewers
bash -nconfirms both scripts parse, but runningthem needs NVIDIA's Sparrowhawk container, which isn't available in the environment this was built in.
git commit -s) — will add before merge if required, flagging heresince it changes the commit hash and needs a force-push.
NVIDIA/NeMo) is included; that's a separate repository.