Grammar customization

User Guide (Latest Version)
Warning

TN/ITN transitioned from NVIDIA/NeMo repository to a standalone NVIDIA/NeMo-text-processing repository. All updates and discussions/issues should go to the new repository.

All grammar development is done with Pynini library. These grammars can be exported to .far files and used with Riva/Sparrowhawk, see Text Processing Deployment for details.

  1. Install NeMo-TN from source

  2. Run nemo_text_processing/text_normalization/normalize.py or nemo_text_processing/inverse_text_normalization/inverse_normalize.py with –verbose flag to evaluate current behavior on the target case, see argument details in the scripts and this tutorial

  3. Modify existing grammars or add new grammars to cover the target case using Tutorial on how to write new grammars

  4. Add new test cases here:
    • Run python tests:

    • Run Sparrowhawk tests:

WFST TN/ITN resources could be found in here.

Previous Text (Inverse) Normalization
Next Deploy to Production with C++ backend
© | | | | | | |. Last updated on Jun 19, 2024.