Skip to content

Commit 47fd486

Browse files
committed
update sh files
Signed-off-by: Mai Anh <palasek182@gmail.com>
1 parent b272550 commit 47fd486

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tools/text_processing_deployment/pynini_export.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def parse_args():
139139
if __name__ == '__main__':
140140
args = parse_args()
141141

142-
if args.language in ['pt', 'ru', 'es_en', 'mr'] and args.grammars == 'tn_grammars':
142+
if args.language in ['ru', 'es_en', 'mr'] and args.grammars == 'tn_grammars':
143143
raise ValueError('Only ITN grammars could be deployed in Sparrowhawk for the selected languages.')
144144
TNPostProcessingFst = None
145145
ITNPostProcessingFst = None
@@ -194,6 +194,12 @@ def parse_args():
194194
from nemo_text_processing.inverse_text_normalization.pt.verbalizers.verbalize import (
195195
VerbalizeFst as ITNVerbalizeFst,
196196
)
197+
from nemo_text_processing.text_normalization.pt.taggers.tokenize_and_classify import (
198+
ClassifyFst as TNClassifyFst,
199+
)
200+
from nemo_text_processing.text_normalization.pt.verbalizers.verbalize import (
201+
VerbalizeFst as TNVerbalizeFst
202+
)
197203
elif args.language == 'fr':
198204
from nemo_text_processing.inverse_text_normalization.fr.taggers.tokenize_and_classify import (
199205
ClassifyFst as ITNClassifyFst,

tools/text_processing_deployment/sh_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
GRAMMARS="itn_grammars" # tn_grammars
2121
INPUT_CASE="lower_cased" # cased
22-
LANGUAGE="en" # language, {'en', 'es', 'de','zh'} supports both TN and ITN, {'pt', 'ru', 'fr', 'vi'} supports ITN only
22+
LANGUAGE="en" # language, {'en', 'es', 'de','zh', 'pt'} supports both TN and ITN, {'ru', 'fr', 'vi', 'pt'} supports ITN only
2323
OVERWRITE_CACHE="False" # Set to False to re-use .far files
2424
WHITELIST="" # Path to a whitelist file, if None the default will be used
2525
FAR_PATH=$(pwd) # Path where the grammars should be written

0 commit comments

Comments
 (0)