#!/usr/bin/python
# -*- coding: utf-8 -*-
'This module is used to create lm finally'
__author__ = 'chwma'
#system and thirdparty
import argparse
#our package and modules
from lma.util.log import *
def ParseManager():
parse = argparse.ArgumentParser(description = "train lm automatic")
#config file
hinfo = 'global config path of trainning lm'
parse.add_argument('--global_config', required = True, type = str, help = hinfo)
'''
dft = 8888
hinfo = 'zookeeper server port'
parse.add_argument('--port', help = hinfo, type = int, default = dft)
'''
args = parse.parse_args()
return args
def main():
#check dependence
#parse args
args = ParseManager()
#init log
ConfigLog(path="./lm.log")
logging.info("start ...")
logging.info("global config path:%s" % args.global_config)
#load config
#exec 03: train and mixed appa with base
#exec 02: train class model and bugfix
#exec 04: prune base and mixed all
#exec 04: appa2fst
#
#
if __name__=='__main__':
main()