gen_arranger_input.py [25:37]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    fns = os.listdir(args.data + s)
    fns.sort()
    for fn in fns:
        if not fn.startswith("dialogue") or not fn.endswith(".json"):
            continue
        with open(args.data + s + "/" + fn, "r", encoding='utf8') as f:
            data = json.load(f)
            for i in range(len(data)):
                t = ''
                for j in range(len(data[i]["turns"])):
                    for ps in ["beginning", "end"]:
                        if ps in data[i]["turns"][j]:
                            for k in range(len(data[i]["turns"][j][ps])):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



gen_parlai_data.py [20:32]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    fns = os.listdir(args.data + s)
    fns.sort()
    for fn in fns:
        if not fn.startswith("dialogue") or not fn.endswith(".json"):
            continue
        with open(args.data + s + "/" + fn, "r", encoding='utf8') as f:
            data = json.load(f)
        for i in range(len(data)):
            t = ''
            for j in range(len(data[i]["turns"])):
                for ps in ["beginning", "end"]:
                    if ps in data[i]["turns"][j]:
                        for k in range(len(data[i]["turns"][j][ps])):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



