def main():

    inDir = sys.argv[1]
    if not inDir.endswith('/'): inDir += '/'
    fileLst = []
    for file in os.listdir(inDir):
        if file.startswith("tgt"): is_tgt_file = True
        else: is_tgt_file = False

        file = inDir + file
        if os.path.isfile(file):
            if not is_tgt_file: fileLst.append(file)

    sys.stderr.write( "Total grammar files found: %d\n" % (len(fileLst)) )
    t_beg = time.time()
    read_n_merge(fileLst)
    sys.stderr.write( "Total time taken         : %g\n" % (time.time() - t_beg) )
dataset/ETHPy150Open sfu-natlang/Kriya/src/Kriya-Grammar-Xtrctr/fullModelSize.py/main/original