d545a2a338e2d00e45482fbad287b96995f448e5,probing/split_constituent_data.py,,split_file,#Any#,35

Before Change


    return (pos_record, non_record)

def split_file(fname):
    pieces = fname.split(".json", 1)
    new_pos_name = pieces[0] + ".pos.json" + pieces[1]
    new_non_name = pieces[0] + ".nonterminal.json" + pieces[1]
    log.info("Processing file: %s", fname)
    record_iter = list(utils.load_json_data(fname))
    log.info("  saving to %s and %s", new_pos_name, new_non_name)

After Change


    dirname, base = os.path.split(fname)
    
    pos_dir = os.path.join(dirname, "pos")
    os.makedirs(pos_dir, exist_ok=True)
    new_pos_name = os.path.join(pos_dir, base)
    
    non_dir = os.path.join(dirname, "nonterminal")
    os.makedirs(non_dir, exist_ok=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: jsalt18-sentence-repl/jiant
Commit Name: d545a2a338e2d00e45482fbad287b96995f448e5
Time: 2018-12-20
Author: iftenney@users.noreply.github.com
File Name: probing/split_constituent_data.py
Class Name:
Method Name: split_file


Project Name: AlexsLemonade/refinebio
Commit Name: adb70969fba94a26335b8f90b342bbfa95b75b1a
Time: 2018-09-06
Author: miserlou@gmail.com
File Name: workers/data_refinery_workers/processors/qn_reference.py
Class Name:
Method Name: _prepare_input


Project Name: danforthcenter/plantcv
Commit Name: 6a9c9bdc8a438460d9d8500e323eea510883d6c6
Time: 2019-10-21
Author: dschneiderch@users.noreply.github.com
File Name: plantcv/utils/sample_images.py
Class Name:
Method Name: sample_images