Skip to content

Commit 1b81616

Browse files
Fix parse "None" as string (#33)
* Fix parse "None" as string Signed-off-by: Anand Joseph <anajoseph@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Anand Joseph <anajoseph@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 568cbb5 commit 1b81616

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/text_processing_deployment/pynini_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def parse_args():
9292
"e.g., for English whitelist files are stored under inverse_normalization/en/data/whitelist. If None,"
9393
"the default file will be used.",
9494
default=None,
95-
type=str,
95+
type=lambda x: None if x == "None" else x,
9696
)
9797
parser.add_argument("--overwrite_cache", help="set to True to re-create .far grammar files", action="store_true")
9898
parser.add_argument(

0 commit comments

Comments
 (0)