NeMo Text Processing API

Model Classes

nemo_text_processing.text_normalization.GraphFst[source]

alias of nemo_text_processing.text_normalization.

class nemo_text_processing.text_normalization.ClassifyFst(input_case: str, deterministic: bool = True)[source]

Bases: nemo_text_processing.text_normalization.graph_utils.GraphFst

Final class that composes all other classification grammars. This class can process an entire sentence including punctuation. For deployment, this grammar will be compiled and exported to OpenFst Finate State Archiv (FAR) File. More details to deployment at NeMo/tools/text_processing_deployment.

Parameters
  • input_case – accepting either “lower_cased” or “cased” input.

  • deterministic – if True will provide a single transduction option, for False multiple options (used for audio-based normalization)

class nemo_text_processing.text_normalization.VerbalizeFst(deterministic: bool = True)[source]

Bases: nemo_text_processing.text_normalization.graph_utils.GraphFst

Composes other verbalizer grammars. For deployment, this grammar will be compiled and exported to OpenFst Finate State Archiv (FAR) File. More details to deployment at NeMo/tools/text_processing_deployment.

Parameters

deterministic – if True will provide a single transduction option, for False multiple options (used for audio-based normalization)

class nemo_text_processing.text_normalization.VerbalizeFinalFst(deterministic: bool = True)[source]

Bases: nemo_text_processing.text_normalization.graph_utils.GraphFst

Finite state transducer that verbalizes an entire sentence, e.g. tokens { name: “its” } tokens { time { hours: “twelve” minutes: “thirty” } } tokens { name: “now” } tokens { name: “.” } -> its twelve thirty now .

Parameters

deterministic – if True will provide a single transduction option, for False multiple options (used for audio-based normalization)

nemo_text_processing.inverse_text_normalization.ClassifyFst

alias of nemo_text_processing.inverse_text_normalization.

nemo_text_processing.inverse_text_normalization.VerbalizeFst

alias of nemo_text_processing.inverse_text_normalization.

nemo_text_processing.inverse_text_normalization.VerbalizeFinalFst

alias of nemo_text_processing.inverse_text_normalization.