Index: lex_build.py ================================================================== --- lex_build.py +++ lex_build.py @@ -1,8 +1,10 @@ #!python3 -# Lexicon builder +""" +Lexicon builder +""" import argparse from distutils import dir_util import graphspell.dawg as fsa @@ -20,10 +22,11 @@ oDic = IBDAWG(sfDict + ".bdic") oDic.writeAsJSObject("graphspell-js/_dictionaries/" + sfDict + ".json", bBinaryDictAsHexString=True) def main (): + "parse args from CLI" xParser = argparse.ArgumentParser() xParser.add_argument("src_lexicon", type=str, help="path and file name of the source lexicon") xParser.add_argument("lang_code", type=str, help="language code") xParser.add_argument("lang_name", type=str, help="language name") xParser.add_argument("dic_filename", type=str, help="dictionary file name (without extension)")