MCPcopy Index your code
hub / github.com/modelscope/FunASR / parse_args

Function parse_args

fun_text_processing/text_normalization/normalize.py:490–529  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

488
489
490def parse_args():
491 parser = ArgumentParser()
492 input = parser.add_mutually_exclusive_group()
493 input.add_argument("--text", dest="input_string", help="input string", type=str)
494 input.add_argument("--input_file", dest="input_file", help="input file path", type=str)
495 parser.add_argument("--output_file", dest="output_file", help="output file path", type=str)
496 parser.add_argument(
497 "--language", help="language", choices=["en", "de", "es", "zh"], default="en", type=str
498 )
499 parser.add_argument(
500 "--input_case",
501 help="input capitalization",
502 choices=["lower_cased", "cased"],
503 default="cased",
504 type=str,
505 )
506 parser.add_argument("--verbose", help="print info for debugging", action="store_true")
507 parser.add_argument(
508 "--punct_post_process",
509 help="set to True to enable punctuation post processing to match input.",
510 action="store_true",
511 )
512 parser.add_argument(
513 "--punct_pre_process",
514 help="set to True to enable punctuation pre processing",
515 action="store_true",
516 )
517 parser.add_argument(
518 "--overwrite_cache", help="set to True to re-create .far grammar files", action="store_true"
519 )
520 parser.add_argument(
521 "--whitelist", help="path to a file with with whitelist", default=None, type=str
522 )
523 parser.add_argument(
524 "--cache_dir",
525 help="path to a dir with .far grammar file. Set to None to avoid using cache",
526 default=None,
527 type=str,
528 )
529 return parser.parse_args()
530
531
532if __name__ == "__main__":

Callers 1

normalize.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…